Skip to content

Commit 4cee2d8

Browse files
committed
fix --test
1 parent 1984e09 commit 4cee2d8

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ You can leave your comments and bug reports at our [GitHub repository tracker](h
9393

9494
For example, using the toy data provided within this repository,
9595

96-
./isoquant.py --reference tests/toy_data/MAPT.Mouse.reference.fasta \
97-
--genedb tests/toy_data/MAPT.Mouse.genedb.gtf \
98-
--fastq tests/toy_data/MAPT.Mouse.ONT.simulated.fastq \
99-
--data_type nanopore -o toy_data_out
96+
./isoquant.py --fastq /home/andreyp/ablab/IsoQuant/tests/simple_data/chr9.4M.ont.sim.fq.gz \
97+
--reference /home/andreyp/ablab/IsoQuant/tests/simple_data/chr9.4M.fa.gz \
98+
--genedb /home/andreyp/ablab/IsoQuant/tests/simple_data/chr9.4M.gtf.gz \
99+
--data_type nanopore --complete_genedb -p TEST_DATA --output isoquant_test
100100

101101

102102
* To run IsoQuant on aligned reads (make sure your BAM is sorted and indexed) use the following command:

docs/getting-started.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919

2020
For example, using the toy data provided within this repository,
2121

22-
./isoquant.py --reference tests/toy_data/MAPT.Mouse.reference.fasta \
23-
--genedb tests/toy_data/MAPT.Mouse.genedb.gtf \
24-
--fastq tests/toy_data/MAPT.Mouse.ONT.simulated.fastq \
25-
--data_type nanopore -o toy_data_out
22+
./isoquant.py --fastq /home/andreyp/ablab/IsoQuant/tests/simple_data/chr9.4M.ont.sim.fq.gz \
23+
--reference /home/andreyp/ablab/IsoQuant/tests/simple_data/chr9.4M.fa.gz \
24+
--genedb /home/andreyp/ablab/IsoQuant/tests/simple_data/chr9.4M.gtf.gz \
25+
--data_type nanopore --complete_genedb -p TEST_DATA --output isoquant_test
2626

2727

2828
* To run IsoQuant on aligned reads (make sure your BAM is sorted and indexed) use the following command:

isoquant.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,16 +1082,18 @@ def run_pipeline(args):
10821082
# Test mode is triggered by --test option
10831083
class 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']

make-targz.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ cp -r ./tests $TARGET_DIR/
2525
cp -r ./docs $TARGET_DIR/
2626

2727

28+
rm -fr $TARGET_DIR/tests/short_reads_toy/
29+
2830
cp isoquant.py $TARGET_DIR/
2931
cp visualize.py $TARGET_DIR/
3032
cp README.md $TARGET_DIR/

0 commit comments

Comments
 (0)