code stringlengths 1 2.01M | repo_name stringlengths 3 62 | path stringlengths 1 267 | language stringclasses 231
values | license stringclasses 13
values | size int64 1 2.01M |
|---|---|---|---|---|---|
package com.ch_linghu.fanfoudroid.db.dao;
import android.database.Cursor;
/**
* Some as Spring JDBC RowMapper
*
* @see org.springframework.jdbc.core.RowMapper
* @see com.ch_linghu.fanfoudroid.db.dao.SqliteTemplate
* @param <T>
*/
public interface RowMapper<T> {
public T mapRow(Cursor cursor, int rowNum);
}... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/db/dao/RowMapper.java | Java | asf20 | 321 |
package com.ch_linghu.fanfoudroid.db.dao;
import com.ch_linghu.fanfoudroid.db.MessageTable;
// TODO
public class DirectMessageDAO {
private static final String TAG = "DirectMessageDAO";
private SqliteTemplate sqliteTemplate;
public DirectMessageDAO() {
sqliteTemplate = new SqliteTemplat... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/db/dao/DirectMessageDAO.java | Java | asf20 | 356 |
package com.ch_linghu.fanfoudroid.db.dao;
import java.util.ArrayList;
import java.util.List;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;
import com.ch_linghu.fanfoudroid.db.TwitterDatabase;
/**
* Some as Spring JdbcTe... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/db/dao/SqliteTemplate.java | Java | asf20 | 2,373 |
package com.ch_linghu.fanfoudroid.db.dao;
public class DAOFactory {
public StatusDAO getStatusDAO() {
return new StatusDAO();
}
public DirectMessageDAO getDirectMessageDAO() {
return new DirectMessageDAO();
}
} | zyqm86-003 | src/com/ch_linghu/fanfoudroid/db/dao/DAOFactory.java | Java | asf20 | 249 |
package com.ch_linghu.fanfoudroid.db.dao;
import java.util.List;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;
import com.ch_linghu.fanfoudroid.data2.Status;
import com.ch_linghu.fanfoudroid.db.StatusTable;
import com.ch_... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/db/dao/StatusDAO.java | Java | asf20 | 6,275 |
package com.ch_linghu.fanfoudroid.db;
import java.text.ParseException;
import android.database.Cursor;
import android.provider.BaseColumns;
import android.util.Log;
import com.ch_linghu.fanfoudroid.data.Dm;
/**
* Table - Direct Messages
*
*/
public final class MessageTable implements BaseColumns {
publ... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/db/MessageTable.java | Java | asf20 | 3,293 |
package com.ch_linghu.fanfoudroid.db;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.provider.BaseColumns;
import android.util.Log;
import com.ch_linghu.fanfoudroid.data.Tweet;
import com.ch_linghu.fanfoudroid.helper.Utils;
/**
* T... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/db/StatusTable.java | Java | asf20 | 6,758 |
package com.ch_linghu.fanfoudroid.db;
import java.text.ParseException;
import android.database.Cursor;
import android.provider.BaseColumns;
import android.util.Log;
import com.ch_linghu.fanfoudroid.data.User;
/**
* Table - Followers
*
*/
public final class FollowTable implements BaseColumns {
... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/db/FollowTable.java | Java | asf20 | 4,626 |
package com.ch_linghu.fanfoudroid.db;
import java.io.File;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Locale;
import android.content.ContentValues;
import android.content.Context;
import android.content.SharedPreferences;
import android.database.Cursor;
imp... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/db/TwitterDatabase.java | Java | asf20 | 38,751 |
package com.ch_linghu.fanfoudroid;
import java.util.ArrayList;
import java.util.List;
import android.app.SearchManager;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.vie... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/SearchActivity.java | Java | asf20 | 11,038 |
/*
* Copyright (C) 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/WriteDmActivity.java | Java | asf20 | 11,842 |
package com.ch_linghu.fanfoudroid;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.graphics.B... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/DmActivity.java | Java | asf20 | 17,142 |
package com.ch_linghu.fanfoudroid.helper;
import android.text.Spannable;
import android.text.method.LinkMovementMethod;
import android.text.method.MovementMethod;
import android.view.MotionEvent;
import android.widget.TextView;
public class TestMovementMethod extends LinkMovementMethod {
private double... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/helper/TestMovementMethod.java | Java | asf20 | 1,339 |
/*
* Copyright (C) 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/helper/Utils.java | Java | asf20 | 10,355 |
/*
* Copyright (C) 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/helper/ImageManager.java | Java | asf20 | 12,775 |
package com.ch_linghu.fanfoudroid.helper;
import com.ch_linghu.fanfoudroid.R;
import com.ch_linghu.fanfoudroid.TwitterApplication;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.PixelFormat;
import android.graphics.drawable.Drawable;
public interface ImageCache {
... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/helper/ImageCache.java | Java | asf20 | 554 |
package com.ch_linghu.fanfoudroid.helper;
import android.graphics.Bitmap;
public interface ProfileImageCacheCallback {
void refresh(String url, Bitmap bitmap);
}
| zyqm86-003 | src/com/ch_linghu/fanfoudroid/helper/ProfileImageCacheCallback.java | Java | asf20 | 165 |
/*
* Copyright (C) 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/helper/Preferences.java | Java | asf20 | 2,418 |
package com.ch_linghu.fanfoudroid.helper;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import android.graphics.Bitmap;
import android.util.Log;
import com.ch_linghu.fanfoudroid.TwitterApplication;
import com.ch_linghu.fanfoudroid.task.GenericTask;
import com.ch_linghu.fanfoudroid... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/helper/ProfileImageCacheManager.java | Java | asf20 | 3,043 |
package com.ch_linghu.fanfoudroid.helper;
import java.util.HashMap;
import android.graphics.Bitmap;
public class MemoryImageCache implements ImageCache {
private HashMap<String, Bitmap> mCache;
public MemoryImageCache() {
mCache = new HashMap<String, Bitmap>();
}
@Override
public Bi... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/helper/MemoryImageCache.java | Java | asf20 | 836 |
package com.ch_linghu.fanfoudroid.helper;
import android.app.Activity;
import android.content.Intent;
import android.widget.Toast;
import com.ch_linghu.fanfoudroid.LoginActivity;
import com.ch_linghu.fanfoudroid.R;
import com.ch_linghu.fanfoudroid.http.HttpAuthException;
import com.ch_linghu.fanfoudroid.http.HttpExce... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/helper/ExceptionHandler.java | Java | asf20 | 2,066 |
/*
* Copyright (C) 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/StatusActivity.java | Java | asf20 | 19,506 |
package com.ch_linghu.fanfoudroid;
import java.text.MessageFormat;
import java.util.List;
import android.content.Intent;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Adapte... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/FollowingActivity.java | Java | asf20 | 3,297 |
package com.ch_linghu.fanfoudroid;
import java.util.HashSet;
import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.preference.PreferenceM... | zyqm86-003 | src/com/ch_linghu/fanfoudroid/TwitterApplication.java | Java | asf20 | 6,863 |
#!/bin/bash
# 打开apache.http调试信息
adb shell setprop log.tag.org.apache.http VERBOSE
adb shell setprop log.tag.org.apache.http.wire VERBOSE
adb shell setprop log.tag.org.apache.http.headers VERBOSE
echo "Enable Debug"
| zyqm86-003 | tools/openHttpDebug.sh | Shell | asf20 | 229 |
/* Javadoc 样式表 */
/* 在此处定义颜色、字体和其他样式属性以覆盖默认值 */
/* 页面背景颜色 */
body { background-color: #FFFFFF; color:#000000 }
/* 标题 */
h1 { font-size: 145% }
/* 表格颜色 */
.TableHeadingColor { background: #CCCCFF; color:#000000 } /* 深紫色 */
.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* 淡紫色 */
.TableRowColor ... | zyqm86-003 | doc/stylesheet.css | CSS | asf20 | 1,370 |
source ../testsupport.sh
run test.txt
grep -q "Stage hello" test.out || err "Failed to find expected stage hello"
grep -q "Stage world" test.out || err "Failed to find expected stage world"
[ ! -f test.txt.hello ] && err "Failed to find expected output test.txt"
[ ! -f test.txt.hello.world ] && err "Failed to find e... | zxd06407-bpipe | tests/implicitmultioutput/run.sh | Shell | bsd | 532 |
/*
* Simplest possible test using inputs and outputs
* join them together in a pipeline
*/
hello = {
exec "cp $input $output"
}
world = {
exec "cp $input $output1"
}
there = {
exec "cp $input $output2"
}
run {
hello + world + there
}
| zxd06407-bpipe | tests/implicitmultioutput/test.groovy | Groovy | bsd | 244 |
rm -f test.txt.* null
| zxd06407-bpipe | tests/implicitmultioutput/cleanup.sh | Shell | bsd | 22 |
source ../testsupport.sh
rm -f test.txt.*
run test.txt
grep -q "Stage hello" test.out || err "Failed to find expected stage hello"
grep -q "Stage world" test.out || err "Failed to find expected stage world"
[ ! -f test.txt.hello ] && err "Failed to find expected output test.txt"
[ ! -f test.txt.hello.world ] && err... | zxd06407-bpipe | tests/simpleinputoutput/run.sh | Shell | bsd | 375 |
/*
* Simplest possible test using inputs and outputs
* join them together in a pipeline
*/
hello = {
exec "cp $input $output"
}
world = {
exec "cp $input $output"
}
run {
hello + world
}
| zxd06407-bpipe | tests/simpleinputoutput/test.groovy | Groovy | bsd | 196 |
source ../testsupport.sh
run test*.txt
[ `grep -c "Stage hello" test.out` == 3 ] || err "Failed to find expected stage hello 3 times"
[ ! -f test.chr1.hello.csv ] && err "Failed to find expected output test.chr1.hello.csv"
[ ! -f test.chr2.hello.csv ] && err "Failed to find expected output test.chr2.hello.csv"
[ ! ... | zxd06407-bpipe | tests/prechrinput/run.sh | Shell | bsd | 496 |
hello = {
exec "cp $input.txt $output.csv"
}
run {
chr(1..5, filterInputs:true) * [ hello ]
}
| zxd06407-bpipe | tests/prechrinput/test.groovy | Groovy | bsd | 101 |
rm -rf *.csv
| zxd06407-bpipe | tests/prechrinput/cleanup.sh | Shell | bsd | 13 |
source ../testsupport.sh
. ./cleanup.sh
run childdir/s_*.txt
grep -q "Stage dedupe" test.out || err "Failed to find expected stage dedupe"
grep -q "Stage align" test.out || err "Failed to find expected stage align"
[ ! -f s_1_1.align.csv ] && err "Failed to find expected output s_1_1.align.csv"
[ ! -f s_2_1.align.... | zxd06407-bpipe | tests/persample_inputotherdir/run.sh | Shell | bsd | 555 |
align = {
msg "Aligning $input"
exec "cat $input1 $input2 > $output.csv"
}
dedupe = {
msg "$input.txt => $output"
exec "cp $input.txt $output"
}
Bpipe.run {
"s_%_*.txt" * [ align + dedupe ]
}
| zxd06407-bpipe | tests/persample_inputotherdir/test.groovy | Groovy | bsd | 206 |
rm -f *align* *.csv
| zxd06407-bpipe | tests/persample_inputotherdir/cleanup.sh | Shell | bsd | 21 |
source ../testsupport.sh
run *.bam
[ `grep -c "Using bam file test.chr1.bam" test.out` == 2 ] || err "Incorrect number of references to test.chr1.bam"
true
| zxd06407-bpipe | tests/perchromosome_filterinputs/run.sh | Shell | bsd | 160 |
hello = {
exec """
echo "Using bam file $input.bam"
"""
exec " cat $input.bam > $output.vcf"
}
world = {
exec """
echo "Using bam file $input.bam"
"""
exec "cat $input.bam > $output.txt"
}
run {
chr(1..2) * [ hello + world ]
}
| zxd06407-bpipe | tests/perchromosome_filterinputs/test.groovy | Groovy | bsd | 278 |
rm -f *.vcf *.txt
| zxd06407-bpipe | tests/perchromosome_filterinputs/cleanup.sh | Shell | bsd | 18 |
source ../testsupport.sh
rm -f test.txt.* *.xml hello.*
# Without an input should get a good message back
run
grep -q "Input expected but not provided" test.out || err "Expected error message asking for input"
# Now run with multiple inputs
run test.csv test.txt
grep -q "Stage hello" test.out || err "Failed to fin... | zxd06407-bpipe | tests/extensions/run.sh | Shell | bsd | 762 |
/*
* Test that implicit input extensions work
* Given multiple inputs at each stage it should select the second one
*/
hello = {
produce(["hello.out.csv", "hello.out.txt"]) {
exec "cp $input.csv ${output[0]}"
exec "cp $input.txt ${output[1]}"
}
}
world = {
exec "cp $input.txt $output"
}
Bpipe.run {
hello +... | zxd06407-bpipe | tests/extensions/test.groovy | Groovy | bsd | 330 |
source ../testsupport.sh
rm -f test.world.txt test.txt
run
grep -q "Stage hello" test.out || err "Failed to find expected stage hello"
grep -q "Stage world" test.out || err "Failed to find expected stage world"
grep -q "1 2 3 4" test.out || err "Failed to find expeced output '1 1 cow'"
true
| zxd06407-bpipe | tests/rscript/run.sh | Shell | bsd | 298 |
/*
* Simplest possible test - just execute a couple of commands and
* join them together in a pipeline
*/
hello = {
exec "echo hello > test.txt"
}
world = {
R{"""
read.table('$input')
print("hello $input")
x = c("cat","dog","tree")
d = data.frame(x=c(1,2,3,4), y=c("cow","dog","tree","... | zxd06407-bpipe | tests/rscript/test.groovy | Groovy | bsd | 393 |
source ../testsupport.sh
run test.txt
exists test.txt.hello
true
| zxd06407-bpipe | tests/single_input_with_number/run.sh | Shell | bsd | 68 |
hello = {
exec "cp $input1 $output"
}
run { hello }
| zxd06407-bpipe | tests/single_input_with_number/test.groovy | Groovy | bsd | 57 |
rm -f test.txt.*
| zxd06407-bpipe | tests/single_input_with_number/cleanup.sh | Shell | bsd | 17 |
source ../testsupport.sh
run test.fastq
exists test.align.bai
exists test.align.bam
exists test.align.filter_bam.bam
bpipe cleanup -y >> test.out
exists test.align.filter_bam.bam
# Should be cleaned up because it is an internal node
notexists test.align.bam
# Should be cleaned up because it accompanies an interna... | zxd06407-bpipe | tests/accompanies/run.sh | Shell | bsd | 358 |
align = {
exec "cp $input.fastq $output.bam"
}
@accompanies("bam")
index = {
transform("bai") {
exec "cp $input.bam $output.bai"
}
forward input
}
filter_bam = {
exec "cp $input.bam $output.bam"
}
run { align + index + filter_bam }
| zxd06407-bpipe | tests/accompanies/test.groovy | Groovy | bsd | 250 |
rm -f .bpipe *.bai *.bam
| zxd06407-bpipe | tests/accompanies/cleanup.sh | Shell | bsd | 25 |
source ../testsupport.sh
run
grep -q "Stage hello" test.out || err "Failed to find expected stage hello"
true
| zxd06407-bpipe | tests/parallel_only/run.sh | Shell | bsd | 113 |
/*
* Simplest possible test - just execute a couple of commands and
* join them together in a pipeline
*/
hello = {
exec "echo hello "
}
run {
[ hello ]
}
| zxd06407-bpipe | tests/parallel_only/test.groovy | Groovy | bsd | 162 |
source ../testsupport.sh
rm foo.txt bar.txt foo.csv foo.txt.world
run test.txt
grep -q "Stage hello" test.out || err "Failed to find expected stage hello"
grep -q "Stage world" test.out || err "Failed to find expected stage world"
[ ! -f foo.txt.world ] && err "Failed to find expected output foo.txt.world"
sort ... | zxd06407-bpipe | tests/inputextmulti/run.sh | Shell | bsd | 455 |
/*
* Input file extensions should enable
* a filtered selection of input files to be processed from multiple
* file types based on file types
*/
hello = {
produce(["foo.txt", "foo.csv", "bar.txt"]) {
exec "cp $input $output1"
exec "cp $input $output2"
exec "cp $input $output3"
}
}
world = {
exec "cat $... | zxd06407-bpipe | tests/inputextmulti/test.groovy | Groovy | bsd | 375 |
rm -f foo.txt bar.txt foo.csv foo.txt.world null
| zxd06407-bpipe | tests/inputextmulti/cleanup.sh | Shell | bsd | 50 |
source ../testsupport.sh
run test1.txt test2.txt
exists test1.merge.csv
true
| zxd06407-bpipe | tests/from_filter_chain/run.sh | Shell | bsd | 80 |
hello = {
from("txt") filter("merge") {
exec "cat $inputs.txt > $output.txt"
}
}
world = {
from("txt") transform("csv") {
exec "cat $inputs.txt > $output.csv"
}
}
run { hello + world }
| zxd06407-bpipe | tests/from_filter_chain/test.groovy | Groovy | bsd | 223 |
rm -f *.merge.*
| zxd06407-bpipe | tests/from_filter_chain/cleanup.sh | Shell | bsd | 16 |
#!/bin/bash
# A very minimal test script
if [ "$1" == "start" ];
then
#echo "Starting $*"
echo "$COMMAND" >> dummy2.log.txt
bash -c "if $COMMAND ; then echo 0 > $$.txt ; else echo 1 > $$.txt; fi" &
PROCID=$!
echo $PROCID
echo $$ > $PROCID.id.txt
elif [ "$1" == "status" ];
then
SHELL_PROC_ID=`cat $2.id.tx... | zxd06407-bpipe | tests/withconfig/dummy2.sh | Shell | bsd | 550 |
#!/bin/bash
# A very minimal test script
if [ "$1" == "start" ];
then
#echo "Starting $*"
echo "$COMMAND" >> dummy1.log.txt
bash -c "if $COMMAND ; then echo 0 > $$.txt ; else echo 1 > $$.txt; fi" &
PROCID=$!
echo $PROCID
echo $$ > $PROCID.id.txt
elif [ "$1" == "status" ];
then
SHELL_PROC_ID=`cat $2.id.tx... | zxd06407-bpipe | tests/withconfig/dummy.sh | Shell | bsd | 550 |
#!/bin/bash
# A very minimal test script
if [ "$1" == "start" ];
then
#echo "Starting $*"
echo "$COMMAND" >> dummy3.log.txt
bash -c "if $COMMAND ; then echo 0 > $$.txt ; else echo 1 > $$.txt; fi" &
PROCID=$!
echo $PROCID
echo $$ > $PROCID.id.txt
elif [ "$1" == "status" ];
then
SHELL_PROC_ID=`cat $2.id.tx... | zxd06407-bpipe | tests/withconfig/dummy3.sh | Shell | bsd | 550 |
source ../testsupport.sh
./cleanup.sh
run
grep -q "Stage init" test.out || err "Failed to find expected stage init"
grep -q "Stage hello" test.out || err "Failed to find expected stage hello"
grep -q "Stage there" test.out || err "Failed to find expected stage there"
grep -q "Stage world" test.out || err "Failed to ... | zxd06407-bpipe | tests/withconfig/run.sh | Shell | bsd | 542 |
init = {
// start by cleaning up all the files
["dummy1.log.txt","dummy2.log.txt","dummy3.log.txt"].collect { new File(it) }.each { if(it.exists()) it.delete() }
forward null
}
hello = {
exec """for i in 1 2 3; do echo "Hello World $i"; sleep 2; done """
if(!new File("dummy1.log.txt").exists())
throw ... | zxd06407-bpipe | tests/withconfig/test.groovy | Groovy | bsd | 1,128 |
ls | grep '[0-9].*.txt' | xargs rm -f
rm -f dummy*.log.txt
| zxd06407-bpipe | tests/withconfig/cleanup.sh | Shell | bsd | 59 |
source ../testsupport.sh
run s_*.txt
grep -q "INPUTS: s_2_ignore_b_1.txt s_2_ignore_b_2.txt" test.out || err "Failed to find correct split group 2.b"
grep -q "INPUTS: s_1_ignore_b_1.txt s_1_ignore_b_2.txt" test.out || err "Failed to find correct split group 1.b"
grep -q "INPUTS: s_2_ignore_a_1.txt s_2_ignore_a_2.txt"... | zxd06407-bpipe | tests/multiplesplitgroups/run.sh | Shell | bsd | 497 |
hello = {
msg "INPUTS: $input1 $input2"
}
run {
"s_%_ignore_%_*.txt" * [ hello ]
}
| zxd06407-bpipe | tests/multiplesplitgroups/test.groovy | Groovy | bsd | 90 |
#!/bin/bash
# Clean up standard unwanted files
for i in .bpipe test.out commandlog.txt doc ;
do
find . -name "$i" | xargs rm -rf
done
# Run individual cleanup scripts
for i in `find . -name cleanup.sh`; do cd `dirname $i`; chmod uga+rx ./cleanup.sh; ./cleanup.sh; cd - > /dev/null 2>&1 ; done
| zxd06407-bpipe | tests/clean.sh | Shell | bsd | 297 |
source ../testsupport.sh
rm -f test.txt.*
rm -rf output
bpipe run -d output test.groovy test.txt > test.out 2>&1
grep -q "Stage hello" test.out || err "Failed to find expected stage hello"
grep -q "Stage world" test.out || err "Failed to find expected stage world"
[ ! -f output/test.txt.hello ] && err "Failed to ... | zxd06407-bpipe | tests/outputfolder/run.sh | Shell | bsd | 463 |
/*
* Simplest possible test using inputs and outputs
* join them together in a pipeline
*/
hello = {
msg "echo 'output = $output'"
exec "cp $input $output"
}
world = {
exec "cp $input $output"
}
Bpipe.run {
hello + world
}
| zxd06407-bpipe | tests/outputfolder/test.groovy | Groovy | bsd | 233 |
source ../testsupport.sh
. ./cleanup.sh
run test.txt
grep -q "Stage hello" test.out || err "Failed to find expected stage hello"
[ ! -f test.hello.txt ] && err "Failed to find expected output test.hello.txt"
[ ! -f .bpipe/outputs/hello.test.hello.txt.properties ] && err "Failed to find expected output meta data fi... | zxd06407-bpipe | tests/filterlines/run.sh | Shell | bsd | 455 |
/*
* Test of filterLines - and undocumented feature at this point, but
* useful to test
*/
hello = {
filter("hello") {
filterLines { true }
}
}
run {
hello
}
| zxd06407-bpipe | tests/filterlines/test.groovy | Groovy | bsd | 174 |
rm -f test.*.txt
| zxd06407-bpipe | tests/filterlines/cleanup.sh | Shell | bsd | 17 |
source ../testsupport.sh
run test1.txt test1.csv test2.txt
exists test2.hello.xml
[ `cat test2.hello.xml | groovy -e 'print(System.in.readLines()[0..1] == ["2","3"])'` == true ] || err "Contents of output file test2.hello.xml didn't match expected"
true
| zxd06407-bpipe | tests/input_ext_with_number/run.sh | Shell | bsd | 261 |
hello = {
exec "cat $input2.txt $input1.csv > $output.xml"
}
run { hello }
| zxd06407-bpipe | tests/input_ext_with_number/test.groovy | Groovy | bsd | 79 |
rm -f *.xml
| zxd06407-bpipe | tests/input_ext_with_number/cleanup.sh | Shell | bsd | 12 |
child_stage = {
exec "echo child stage"
}
| zxd06407-bpipe | tests/load/child.groovy | Groovy | bsd | 46 |
source ../testsupport.sh
run
grep -q "Stage child_stage" test.out || err "Failed to find expected stage child_stage"
true
| zxd06407-bpipe | tests/load/run.sh | Shell | bsd | 125 |
load "child.groovy"
run { child_stage }
| zxd06407-bpipe | tests/load/test.groovy | Groovy | bsd | 41 |
source ../testsupport.sh
rm -rf doc
run test.txt
grep -q "Stage hello" test.out || err "Failed to find expected stage hello"
grep -q "Stage bar" test.out || err "Failed to find expected stage world"
grep -q "Stage fail" test.out || err "Failed to find expected stage world"
[ -e doc/index.html ] || err "Unable to fi... | zxd06407-bpipe | tests/documentation/run.sh | Shell | bsd | 567 |
about title: "My awesome pipeline",
author: "Simon Sadedin"
foo = {
doc title: "Foo is a test pipeline",
desc: """
This pipeline is only a test. It doesn't do anything useful,
but it does help to test Bpipe and ensure the documentation functions
are working ... | zxd06407-bpipe | tests/documentation/test.groovy | Groovy | bsd | 1,055 |
source ../testsupport.sh
run test.txt
[ ! -f test.chr1.csv ] && err "Failed to find expected output test.chr1.csv"
[ ! -f test.chr20.csv ] && err "Failed to find expected output test.chr20.csv"
[ ! -f test.chrX.csv ] && err "Failed to find expected output test.chrX.csv"
[ ! -f test.chr1.txt ] && err "Failed to find... | zxd06407-bpipe | tests/perchromosome/run.sh | Shell | bsd | 617 |
hello_there = {
filter("hello") {
exec """ echo "hello there $chr" > $output """
}
}
world = {
transform("csv") {
exec """ cp $input $output """
}
}
noinput = {
msg "hello $chr ==> $output"
}
run {
chr(1..22,"X","Y","M") * [ hello_there + world ]
}
| zxd06407-bpipe | tests/perchromosome/test.groovy | Groovy | bsd | 277 |
rm -f test.*.csv test.*.txt *.hello.* test.txt.*;
| zxd06407-bpipe | tests/perchromosome/cleanup.sh | Shell | bsd | 52 |
source ../testsupport.sh
run
grep -q "foo = cat" test.out || err "Failed to find expected output foo = cat"
grep -q "foo = tree" test.out || err "Failed to find expected output foo = tree"
grep -q "foo = fubar" test.out || err "Failed to find expected output foo = fubar"
true
| zxd06407-bpipe | tests/param/run.sh | Shell | bsd | 280 |
/*
* Simplest possible test - just execute a couple of commands and
* join them together in a pipeline
*/
hello = {
msg "foo = $foo"
}
bar = {
msg "foo = $foo"
}
Bpipe.run {
hello.using(foo:"cat") + hello.using(foo:"tree") + bar.using(foo:"fubar")
}
| zxd06407-bpipe | tests/param/test.groovy | Groovy | bsd | 274 |
source ../testsupport.sh
rm -f test.world.txt test.txt
run
grep -q "Stage hello" test.out || err "Failed to find expected stage hello"
grep -q "Stage world" test.out || err "Failed to find expected stage world"
[ ! -f test.txt ] && err "Failed to find expected output test.txt"
[ ! -f test.world.txt ] && err "Failed... | zxd06407-bpipe | tests/simple/run.sh | Shell | bsd | 367 |
/*
* Simplest possible test - just execute a couple of commands and
* join them together in a pipeline
*/
hello = {
exec "echo hello > test.txt"
}
world = {
exec "echo world > test.world.txt"
}
Bpipe.run {
hello + world
}
| zxd06407-bpipe | tests/simple/test.groovy | Groovy | bsd | 232 |
source ../testsupport.sh
rm -f *align* *foo*
run s_*.txt
grep -q "Stage dedupe" test.out || err "Failed to find expected stage dedupe"
grep -q "Stage align" test.out || err "Failed to find expected stage align"
[ ! -f s_2_1.txt.foo.align ] && err "Failed to find expected output s_2_1.txt.foo.align"
[ ! -f s_3_1.tx... | zxd06407-bpipe | tests/persampleinputext/run.sh | Shell | bsd | 401 |
align = {
exec "cat $input1 $input2 > $output"
}
dedupe = {
filter("foo") {
msg "$input.txt => $output"
exec "cat $input.txt > $output"
}
}
Bpipe.run {
"s_%_*.txt" * [ align + dedupe ]
}
| zxd06407-bpipe | tests/persampleinputext/test.groovy | Groovy | bsd | 216 |
source ../testsupport.sh
run input*.txt
#grep -q "Stage hello" test.out || err "Failed to find expected stage hello"
#grep -q "Stage world" test.out || err "Failed to find expected stage world"
#grep -q "Stage world2" test.out || err "Failed to find expected stage world2"
#grep -q "Stage end" test.out || err "Failed ... | zxd06407-bpipe | tests/huge_parallel/run.sh | Shell | bsd | 721 |
/*
* The main test here is 100 threads / files all at once and whether that creates any
* issues.
*/
hello = {
exec "cp $input $output"
}
world = {
exec "cp $input $output"
}
world2 = {
// produce("anotheroutput.txt") {
exec "cp $input $output"
// }
}
end = {
exec "cat $inputs > $output"
}
Bpipe.run {... | zxd06407-bpipe | tests/huge_parallel/test.groovy | Groovy | bsd | 354 |
rm -f *.hello *.hello.*
| zxd06407-bpipe | tests/huge_parallel/cleanup.sh | Shell | bsd | 24 |
source ../testsupport.sh
run *.bed *.peak
exists s2_macs_sort.macs.intersect.bed s1_macs_sort.macs.intersect.bed
true
| zxd06407-bpipe | tests/split_on_2_file_types/run.sh | Shell | bsd | 121 |
@Filter("intersect")
intersectBed = {
exec "cat $input.bed $input.peak > $output"
}
run {
"%_" * [ intersectBed ]
}
| zxd06407-bpipe | tests/split_on_2_file_types/test.groovy | Groovy | bsd | 121 |
rm -f *.intersect.*
| zxd06407-bpipe | tests/split_on_2_file_types/cleanup.sh | Shell | bsd | 20 |
source ../testsupport.sh
. ./cleanup.sh
run s_1_1.txt s_1_2.txt s_2_1.txt s_2_2.txt
grep -q "Stage align" test.out || err "Failed to find expected stage align"
[ ! -f s_1_1.chr1.bam ] && err "Failed to find expected output s_1_1.align.txt"
true
| zxd06407-bpipe | tests/persampletransform/run.sh | Shell | bsd | 253 |
/**
* Check that a "chr" variable makes its way through a transform into
* the wrapped content.
*/
align = {
transform("bam") {
msg "$inputs => $output"
exec "cat $inputs > $output"
}
}
run {
chr(1) * [ align ]
}
| zxd06407-bpipe | tests/persampletransform/test.groovy | Groovy | bsd | 233 |
rm -f *align* *.bam
| zxd06407-bpipe | tests/persampletransform/cleanup.sh | Shell | bsd | 21 |
source ../testsupport.sh
export BPIPE_LIB=./bpipelib
rm -f test.*.txt
run
grep -q "Stage hello" test.out || err "Failed to find expected stage hello"
grep -q "Stage world" test.out || err "Failed to find expected stage world"
grep -q "Stage jupiter" test.out || err "Failed to find expected stage jupiter"
grep -q "S... | zxd06407-bpipe | tests/define/run.sh | Shell | bsd | 938 |
external = {
exec 'echo "This is an external stage"'
exec "echo external > test.external.txt"
}
another = {
msg "Another stage"
}
all_external = segment { external + another }
| zxd06407-bpipe | tests/define/bpipelib/pipes.groovy | Groovy | bsd | 186 |