@@ -1082,16 +1082,18 @@ def run_pipeline(args):
10821082# Test mode is triggered by --test option
10831083class TestMode (argparse .Action ):
10841084 def __call__ (self , parser , namespace , values , option_string = None ):
1085- out_dir = 'isoquant_test'
1086- if os .path .exists (out_dir ):
1087- shutil .rmtree (out_dir )
1085+ self . out_dir = 'isoquant_test'
1086+ if os .path .exists (self . out_dir ):
1087+ shutil .rmtree (self . out_dir )
10881088 source_dir = os .path .dirname (os .path .realpath (__file__ ))
1089- options = ['--output' , out_dir , '--threads' , '2' ,
1089+ options = ['--output' , self . out_dir , '--threads' , '2' ,
10901090 '--fastq' , os .path .join (source_dir , 'tests/simple_data/chr9.4M.ont.sim.fq.gz' ),
10911091 '--reference' , os .path .join (source_dir , 'tests/simple_data/chr9.4M.fa.gz' ),
10921092 '--genedb' , os .path .join (source_dir , 'tests/simple_data/chr9.4M.gtf.gz' ),
10931093 '--clean_start' , '--data_type' , 'nanopore' , '--complete_genedb' , '--force' , '-p' , 'TEST_DATA' ]
10941094 print ('=== Running in test mode === ' )
1095+ print ("Running IsoQuant in test mode with the following options:" )
1096+ print (' ' .join (options ))
10951097 print ('Any other option is ignored ' )
10961098 main (options )
10971099 if self ._check_log ():
@@ -1101,9 +1103,9 @@ def __call__(self, parser, namespace, values, option_string=None):
11011103 sys .exit (IsoQuantExitCode .TEST_FAILED )
11021104 parser .exit ()
11031105
1104- @ staticmethod
1105- def _check_log ():
1106- with open ('isoquant_test/ isoquant.log' , 'r' ) as f :
1106+
1107+ def _check_log (self ):
1108+ with open (os . path . join ( self . out_dir , ' isoquant.log') , 'r' ) as f :
11071109 log = f .read ()
11081110
11091111 correct_results = ['total assignments 4' , 'polyA tail detected in 2' , 'unique: 1' , 'known: 2' , 'Processed 1 experiment' ]
0 commit comments