@@ -30,6 +30,8 @@ def setup_module():
30
30
global TEST_TEMP_DIR
31
31
if os .path .exists ("/scratch" ):
32
32
TEST_TEMP_DIR = tempfile .mkdtemp (dir = "/scratch" );
33
+ elif os .path .exists ("/srv/data/scratch" ):
34
+ TEST_TEMP_DIR = tempfile .mkdtemp (dir = "/srv/data/scratch" );
33
35
else :
34
36
TEST_TEMP_DIR = tempfile .mkdtemp ();
35
37
global output
@@ -51,6 +53,8 @@ def test_abra():
51
53
'--reference_sequence' , genome_string ,
52
54
'--targets' , input_bed ,
53
55
'--working' , abratmpdir ]
56
+ print " " .join (cmd )
57
+
54
58
prog_output = subprocess .check_output (" " .join (cmd ), shell = True )
55
59
#check prog_output to see if it picked up the arguments we gave...
56
60
assert_true (re .search ("input0: /ifs/work/charris/testdata_for_cmo/P1_ADDRG_MD.abra.fmi.printreads.bam" , prog_output ))
@@ -106,6 +110,7 @@ def test_printreads():
106
110
'--num_cpu_threads_per_data_thread' , '6' ,
107
111
'--out' , output ,
108
112
'--reference_sequence' , genome_string ]
113
+ print " " .join (cmd )
109
114
prog_output = subprocess .check_output (" " .join (cmd ), shell = True , stderr = subprocess .STDOUT )
110
115
assert_true (re .search ("INFO .* HelpFormatter - Program Args: -T PrintReads --input_file /ifs/work/charris/testdata_for_cmo/P1_ADDRG_MD.abra.fmi.printreads.bam --num_cpu_threads_per_data_thread 6 --BQSR /ifs/work/charris/testdata_for_cmo/recal.matrix --reference_sequence /ifs/depot/assemblies/H.sapiens/b37/b37.fasta --out" , prog_output ))
111
116
@@ -125,6 +130,7 @@ def test_baserecal():
125
130
'--java_args' , "'-Xmx48g -Xms256m -XX:-UseGCOverheadLimit'" ,
126
131
'--out' , output ,
127
132
'--reference_sequence' , genome_string ]
133
+ print " " .join (cmd )
128
134
prog_output = subprocess .check_output (" " .join (cmd ), shell = True , stderr = subprocess .STDOUT )
129
135
assert_true (re .search ("INFO .* HelpFormatter - Program Args: -T BaseRecalibrator --input_file /ifs/work/charris/testdata_for_cmo/P1_ADDRG_MD.abra.fmi.printreads.bam --reference_sequence /ifs/depot/assemblies/H.sapiens/b37/b37.fasta --knownSites /ifs/work/charris/temp_depot/dbsnp_138.b37.excluding_sites_after_129.vcf --knownSites /ifs/work/charris/temp_depot/hapmap_3.3.b37.vcf --knownSites /ifs/work/charris/temp_depot/1000G_phase1.snps.high_confidence.b37.vcf --knownSites /ifs/work/charris/temp_depot/Mills_and_1000G_gold_standard.indels.b37.vcf --covariate ContextCovariate --covariate CycleCovariate --covariate ReadGroupCovariate --covariate QualityScoreCovariate --out" , prog_output ))
130
136
@@ -143,6 +149,7 @@ def test_addorreplacereadgroups():
143
149
'--SM' , 'P-0000377-T02-IM3' ,
144
150
'--SO' , 'coordinate' ,
145
151
'--TMP_DIR' , tmpdir ]
152
+ print " " .join (cmd )
146
153
prog_output = subprocess .check_output (" " .join (cmd ), shell = True , stderr = subprocess .STDOUT )
147
154
print prog_output
148
155
assert_true (re .search ("picard.sam.AddOrReplaceReadGroups INPUT=/ifs/work/charris/testdata_for_cmo/P1_ADDRG_MD.abra.fmi.printreads.bam OUTPUT=.* SORT_ORDER=coordinate RGID=P-0000377 RGLB=5 RGPL=Illumina RGPU=bc26 RGSM=P-0000377-T02-IM3 RGCN=MSKCC TMP_DIR=\[" + current_dir + "\] CREATE_INDEX=true VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_MD5_FILE=false" , prog_output ))
@@ -162,6 +169,7 @@ def test_trimgalore():
162
169
fastq1 ,
163
170
fastq2 ,
164
171
]
172
+ print " " .join (cmd )
165
173
prog_output = subprocess .check_output (" " .join (cmd ), shell = True , stderr = subprocess .STDOUT )
166
174
assert_true ("/opt/common/CentOS_6/trim_galore/Trim_Galore_v0.2.5/trim_galore --adapter AGATCGGAAGAGCACACGTCTGAACTCCAGTCACATGAGCATCTCGTATGCCGTCTTCTGCTTG --suppress_warn --paired --length 25 --gzip --quality 1 --adapter2 AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT /ifs/work/charris/testdata_for_cmo/P1_R1.fastq.gz /ifs/work/charris/testdata_for_cmo/P1_R2.fastq.gz" , prog_output )
167
175
@@ -186,6 +194,7 @@ def test_vardict():
186
194
'-x' , '2000' ,
187
195
'-z' , '1' ,
188
196
input_bed ]
197
+ print " " .join (cmd )
189
198
subprocess .check_call (" " .join (cmd ), shell = True )
190
199
191
200
@@ -211,6 +220,7 @@ def test_somaticindeldetector():
211
220
'--read_filter' , 'UnmappedRead' ,
212
221
'--read_filter' , 'MappingQuality' ,
213
222
'--read_filter' , 'BadCigar' ]
223
+ print " " .join (cmd )
214
224
prog_output = subprocess .check_output (" " .join (cmd ), shell = True , stderr = subprocess .STDOUT )
215
225
assert_true (re .search ("INFO .* HelpFormatter - Program Args: -T SomaticIndelDetector --input_file:normal /ifs/work/charris/testdata_for_cmo/P2_ADDRG_MD.abra.fmi.printreads.bam --input_file:tumor /ifs/work/charris/testdata_for_cmo/P1_ADDRG_MD.abra.fmi.printreads.bam --min_mapping_quality_score 20 --intervals /ifs/work/charris/testdata_for_cmo/intervals.bed --filter_expressions T_COV<10||N_COV<4||T_INDEL_F<0.0001||T_INDEL_CF<0.7 --maxNumberOfReads 100000 --verboseOutput .* --read_filter DuplicateRead --read_filter FailsVendorQualityCheck --read_filter NotPrimaryAlignment --read_filter BadMate --read_filter MappingQualityUnavailable --read_filter UnmappedRead --read_filter MappingQuality --read_filter BadCigar --reference_sequence /ifs/depot/assemblies/H.sapiens/b37/b37.fasta --out .*" , prog_output ))
216
226
@@ -223,6 +233,7 @@ def test_findcoveredintervals():
223
233
'--out' ,output ,
224
234
'--reference_sequence' , genome_string ,
225
235
'--input_file' ,normal_bam ]
236
+ print " " .join (cmd )
226
237
prog_output = subprocess .check_output (" " .join (cmd ),shell = True , stderr = subprocess .STDOUT )
227
238
assert_true (re .search ("INFO .* HelpFormatter - Program Args: -T FindCoveredIntervals --input_file /ifs/work/charris/testdata_for_cmo/P1_ADDRG_MD.abra.fmi.printreads.bam --input_file /ifs/work/charris/testdata_for_cmo/P2_ADDRG_MD.abra.fmi.printreads.bam --out .* --reference_sequence /ifs/depot/assemblies/H.sapiens/b37/b37.fasta" ,prog_output ))
228
239
@@ -234,6 +245,7 @@ def test_pindel():
234
245
'--output-prefix' ,'Tumor' ,
235
246
'--sample_names' ,'"Normal Tumor"' ]
236
247
248
+ print " " .join (cmd )
237
249
prog_output = subprocess .check_output (" " .join (cmd ),shell = True , stderr = subprocess .STDOUT )
238
250
#print prog_output
239
251
assert_true (re .search (tumor_bam ,prog_output ))
@@ -247,6 +259,7 @@ def test_index():
247
259
cmd = ['cmo_index' ,
248
260
'--normal' ,normal_bam ,
249
261
'--tumor' ,tumor_bam ]
262
+ print " " .join (cmd )
250
263
prog_output = subprocess .check_output (" " .join (cmd ),shell = True ,stderr = subprocess .STDOUT )
251
264
assert_true (re .search (normal_bam ,prog_output ))
252
265
assert_true (re .search (tumor_bam ,prog_output ))
@@ -261,18 +274,21 @@ def test_markduplicates():
261
274
'--O' , output ,
262
275
'--TMP_DIR' , tmpdir
263
276
]
277
+ print " " .join (cmd )
264
278
prog_output = subprocess .check_output (" " .join (cmd ), shell = True , stderr = subprocess .STDOUT )
265
- assert_true (re .search ("picard.sam.markduplicates.MarkDuplicates INPUT=\[/ifs/work/charris/testdata_for_cmo/P1_ADDRG_MD.abra.fmi.printreads.bam\] OUTPUT=.* METRICS_FILE=.* TMP_DIR=\[" + current_dir + "\] CREATE_INDEX=true MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP=50000 MAX_FILE_HANDLES_FOR_READ_ENDS_MAP=8000 SORTING_COLLECTION_SIZE_RATIO=0.25 PROGRAM_RECORD_ID=MarkDuplicates PROGRAM_GROUP_NAME=MarkDuplicates REMOVE_DUPLICATES=false ASSUME_SORTED=false DUPLICATE_SCORING_STRATEGY=SUM_OF_BASE_QUALITIES READ_NAME_REGEX=\[a-zA-Z0-9\]\+:\[0-9\]:\(\[0-9\]\+\):\(\[0-9\]\+\):\(\[0-9\]\+\).* OPTICAL_DUPLICATE_PIXEL_DISTANCE=100 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_MD5_FILE=false" , prog_output ))
279
+ print prog_output
280
+ assert_true (re .search ("INPUT=\[/ifs/work/charris/testdata_for_cmo/P1_ADDRG_MD.abra.fmi.printreads.bam\] OUTPUT=.* METRICS_FILE=.* TMP_DIR=.* CREATE_INDEX=true.*" , prog_output ))
266
281
267
282
def test_fixmateinformation ():
268
283
cmd = ['cmo_picard' ,
269
284
'--version 1.96' ,
270
285
'--cmd' , 'FixMateInformation' ,
271
286
'--I' , tumor_bam ,
272
287
'--O' , output ]
288
+ print cmd
273
289
prog_output = subprocess .check_output (" " .join (cmd ), shell = True , stderr = subprocess .STDOUT )
274
290
print prog_output
275
- assert_true (re .search ("picard.sam.FixMateInformation INPUT=\[/ifs/work/charris/testdata_for_cmo/P1_ADDRG_MD.abra.fmi.printreads.bam\] OUTPUT=.* ASSUME_SORTED=false ADD_MATE_CIGAR=true VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false" , prog_output ))
291
+ assert_true (re .search ("INPUT=\[/ifs/work/charris/testdata_for_cmo/P1_ADDRG_MD.abra.fmi.printreads.bam\] OUTPUT=.* VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false" , prog_output ))
276
292
277
293
278
294
0 commit comments