annotate tools/mytools/sampline.xml @ 0:9071e359b9a3

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:37:19 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="sampline" name="sample">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description>records from a file</description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <command interpreter="python">sampline.py --input=$input --output=$out_file1 --nSample=$nSample --recSize=$recSize --nSkip=$nSkip $replacement</command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 <param name="input" format="txt" type="data" label="Original file"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 <param name="nSample" size="10" type="integer" value="100" label="Number of records to sample"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 <param name="recSize" size="10" type="integer" value="1" label="Number of lines per record"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 <param name="nSkip" size="10" type="integer" value="0" label="Number of top lines to output directly (without sampling)"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 <param name="replacement" label="Sampling with replacement" type="boolean" truevalue="--replacement" falsevalue="" checked="False"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 <data format="input" name="out_file1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 <output name="out_file1" file="testmap.sampled"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 <param name="input" value="test.map" ftype="TXT"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 <param name="nSample" value="100"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 <param name="recSize" value="1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 <param name="nSkip" value="0" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 <param name="replacement" value=""/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 **What it does**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 This tool selects random records from a file. Each record is defined by a fixed number of lines.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 - When doing over-sampling, --replacement option is enforced by default.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 **Example 1: sampling from a BED file**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 parameters::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 1 line per record, sampling 5 lines, without replacement, output line 1 (track name) directly
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 Input::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 track name=test.bed
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 chr1 148078400 148078582 CCDS993.1_cds_0_0_chr1_148078401_r 0 -
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 chr11 116124407 116124501 CCDS8374.1_cds_0_0_chr11_116124408_r 0 -
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 chr15 41826029 41826196 CCDS10101.1_cds_0_0_chr15_41826030_f 0 +
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 chr16 142908 143003 CCDS10397.1_cds_0_0_chr16_142909_f 0 +
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 chr2 220229609 220230869 CCDS2443.1_cds_0_0_chr2_220229610_r 0 -
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 chr20 33579500 33579527 CCDS13256.1_cds_0_0_chr20_33579501_r 0 -
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 chr20 33593260 33593348 CCDS13257.1_cds_0_0_chr20_33593261_f 0 +
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 chr5 131621326 131621419 CCDS4152.1_cds_0_0_chr5_131621327_f 0 +
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 chr7 113660517 113660685 CCDS5760.1_cds_0_0_chr7_113660518_f 0 +
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 chrX 152648964 152649196 CCDS14733.1_cds_0_0_chrX_152648965_r 0 -
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 Output::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 track name=test.bed
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57 chr11 116124407 116124501 CCDS8374.1_cds_0_0_chr11_116124408_r 0 -
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 chr16 142908 143003 CCDS10397.1_cds_0_0_chr16_142909_f 0 +
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 chr20 33579500 33579527 CCDS13256.1_cds_0_0_chr20_33579501_r 0 -
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 chr20 33593260 33593348 CCDS13257.1_cds_0_0_chr20_33593261_f 0 +
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 chr5 131621326 131621419 CCDS4152.1_cds_0_0_chr5_131621327_f 0 +
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 **Example 2: sampling reads from a fastq file**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 parameters::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 4 line per record, sampling 3 records, without replacement
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69 Input::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 @SRR066787.2496 WICMT-SOLEXA:8:1:28:2047 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 NNANNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 +SRR066787.2496 WICMT-SOLEXA:8:1:28:2047 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74 !!%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 @SRR066787.2497 WICMT-SOLEXA:8:1:28:463 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76 GTGATTAAGAAGAGACTGGCATCACTAAGGTGACAT
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77 +SRR066787.2497 WICMT-SOLEXA:8:1:28:463 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78 @A=BBCBBAA@:@:@@@:,?AB:B?BB=*2:@=?AA
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79 @SRR066787.2498 WICMT-SOLEXA:8:1:28:704 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80 GAACCCAATTTTCAAAGAAGTGTGACTGCTTGTTTC
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81 +SRR066787.2498 WICMT-SOLEXA:8:1:28:704 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82 =?BAABBACCCCAA9>>A=>A?A;;@A>ABBABBB:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83 @SRR066787.2499 WICMT-SOLEXA:8:1:28:997 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84 CGACTTCAGGCTCTCGCTAGCCTTCGCTTGACTGAC
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85 +SRR066787.2499 WICMT-SOLEXA:8:1:28:997 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86 BCCBCCB?A1ACAC>;@CCAAABB?8=BA>@?B?@:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87 @SRR066787.2500 WICMT-SOLEXA:8:1:28:582 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88 TCTCTCTCTTTCTCTCTCTCTCTCTCTCTCTCTCTC
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89 +SRR066787.2500 WICMT-SOLEXA:8:1:28:582 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90 ?.?.=9C8CCC:BACBCBC?CCC@CBBBCBBACAC8
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92 Output::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94 @SRR066787.2497 WICMT-SOLEXA:8:1:28:463 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95 GTGATTAAGAAGAGACTGGCATCACTAAGGTGACAT
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96 +SRR066787.2497 WICMT-SOLEXA:8:1:28:463 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97 @A=BBCBBAA@:@:@@@:,?AB:B?BB=*2:@=?AA
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98 @SRR066787.2499 WICMT-SOLEXA:8:1:28:997 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99 CGACTTCAGGCTCTCGCTAGCCTTCGCTTGACTGAC
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100 +SRR066787.2499 WICMT-SOLEXA:8:1:28:997 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101 BCCBCCB?A1ACAC>;@CCAAABB?8=BA>@?B?@:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102 @SRR066787.2500 WICMT-SOLEXA:8:1:28:582 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103 TCTCTCTCTTTCTCTCTCTCTCTCTCTCTCTCTCTC
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104 +SRR066787.2500 WICMT-SOLEXA:8:1:28:582 length=36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
105 ?.?.=9C8CCC:BACBCBC?CCC@CBBBCBBACAC8
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
106
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
107 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
108 </tool>