Missing tests on arguments existence
Need to test the existence of the files passed as arguments of all modules
Issue #3 (closed) : Missing test on the presence of the fasta file
(ISeeker_environment) cklopp@beraldi:/scratch2/src/intronSeeker-master$ python3.6 scripts/intronSeeker.py split --input first_test_hisat2/first_test.Aligned.sortedByCoord.out.bam --reference data/Reduced_real_dataset/Test_set_Cele_contig-assembly.fasta -o first_test_hisat2b mkdir: cannot create directory 'first_test_hisat2b_split': File exists \[E::fai_retrieve\] Failed to retrieve block: unexpected end of file Traceback (most recent call last): File "scripts/intronSeeker.py", line 172, in args.func(\*\*param) File "/media/Stock/src/intronSeeker-master/scripts/intronResearch.py", line 77, in split_research res_gff,res_tmp = find_split(fastafilename,bamfilename) ; File "/media/Stock/src/intronSeeker-master/scripts/intronResearch.py", line 114, in find_split reference = ref_dict.fetch(id) File "pysam/libcfaidx.pyx", line 317, in pysam.libcfaidx.FastaFile.fetch FileNotFoundError: \[Errno 2\] b'No such file or directory'
Issue #2 (closed) : missing test on the presence of the bai file in the same directory as the bam file
python3.6 scripts/intronSeeker.py split --input first_test_hisat2/first_test.Aligned.sortedByCoord.out.bam --reference data/Reduced_real_dataset/Test_set_Cele_contig-assembly.fasta -o first_test_hisat2b Traceback (most recent call last): File "scripts/intronSeeker.py", line 172, in args.func(\*\*param) File "/media/Stock/src/intronSeeker-master/scripts/intronResearch.py", line 77, in split_research res_gff,res_tmp = find_split(fastafilename,bamfilename) ; File "/media/Stock/src/intronSeeker-master/scripts/intronResearch.py", line 112, in find_split aligned = bamfile.fetch(id, multiple_iterators=True) File "pysam/libcalignmentfile.pyx", line 1092, in pysam.libcalignmentfile.AlignmentFile.fetch ValueError: fetch called on bamfile without index
Issue #1 (closed) : missing test in split method when wrong path to bam is given
python3.6 scripts/intronSeeker.py split --input first_test_hisat2/HiSat2.Aligned.sortedByCoord.out.bam --reference data/Reduced_real_dataset/Test_set_Cele_contig-assembly.fasta -o first_test_hisat2 \[E::hts_open_format\] Failed to open file first_test_hisat2/HiSat2.Aligned.sortedByCoord.out.bam Traceback (most recent call last): File "scripts/intronSeeker.py", line 172, in args.func(\*\*param) File "/media/Stock/src/intronSeeker-master/scripts/intronResearch.py", line 77, in split_research res_gff,res_tmp = find_split(fastafilename,bamfilename) ; File "/media/Stock/src/intronSeeker-master/scripts/intronResearch.py", line 96, in find_split reads_list = \[x.split("\\t")\[0\] for x in pysam.idxstats(bamfilename).split("\\n")\[:-2\]\] File "/scratch2/src/anaconda3/envs/ISeeker_environment/lib/python3.6/site-packages/pysam/utils.py", line 75, in __call__ stderr)) pysam.utils.SamtoolsError: 'samtools returned with error 1: stdout=, stderr=samtools idxstats: failed to open "first_test_hisat2/HiSat2.Aligned.sortedByCoord.out.bam": No such file or directory\\n'
-
Test of files existence -
Test of files consistency (non-empty, correct format...)