Open ya73 opened 8 years ago
Did you install samtools
and pysam
??
yes. both of them
You need to check some point :
sam_to_bam
in bin pathtest-data/sam-data/c2c12.Atp2b1.sam
in miso package folder?gff-events/mm9/SE.mm9.gff
and gff-events/mm9/genes/Atop2b1.mm9.gff
. If you don't have it, you can use command git clone https://github.com/yarden/MISO
and copy into your misopy package from cloned git repository.sudo
commandI suspect this may be a duplicate of 107, as it is failing at the index step of samtools. This happens when the sort fails. could be tested with the verbose testing flag:
python -m unittest discover misopy -v
and then check for the silent failure of samtools sort:
Sorting BAM file...
- Executing: samtools sort /shared/app/miniconda/envs/miso/lib/python2.7/site-packages/misopy/test-output/sam-output/c2c12.Atp2b1.bam /shared/app/miniconda/envs/miso/lib/python2.7/site-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted
[bam_sort] Use -T PREFIX / -o FILE to specify temporary and final output files
Usage: samtools sort [options...] [in.bam]
Options:
-l INT Set compression level, from 0 (uncompressed) to 9 (best)
-m INT Set maximum memory per thread; suffix K/M/G recognized [768M]
-n Sort by read name
-t TAG Sort by value of TAG. Uses position as secondary index (or read name if -n is set)
-o FILE Write final output to FILE rather than standard output
-T PREFIX Write temporary files to PREFIX.nnnn.bam
--input-fmt-option OPT[=VAL]
Specify a single input file format option in the form
of OPTION or OPTION=VALUE
-O, --output-fmt FORMAT[,OPT[=VAL]]...
Specify output format (SAM, BAM, CRAM)
--output-fmt-option OPT[=VAL]
Specify a single output file format option in the form
of OPTION or OPTION=VALUE
--reference FILE
Reference sequence FASTA FILE [null]
-@, --threads INT
Number of additional threads to use [0]
Indexing BAM...
- Executing: samtools index /shared/app/miniconda/envs/miso/lib/python2.7/site-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam
[E::hts_open_format] Failed to open file /shared/app/miniconda/envs/miso/lib/python2.7/site-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam
samtools index: failed to open "/shared/app/miniconda/envs/miso/lib/python2.7/site-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam": No such file or directory
Conversion took 0.00 minutes.
FAIL
This is because the new version of samtools need a -o parameters and a .bam suffix to output the right sorted bamfiles.
Hello Yarden,
I ran this command: [ $ python -m unittest discover misopy] according to the manual : https://miso.readthedocs.io/en/fastmiso/#installing-the-fastmiso version-of-miso
Python version is 2.7.6
samtools 1.3.1 is working fine and accessed from terminal with no issues.
I'm working on a graduation projects and got stuck for more than a week.. tried every comment on forums but couldn't get it solved.
Please I need your help.
The result is this error message:
Testing gene-level Psi... Executing: python /usr/local/lib/python2.7/dist-packages/misopy/index_gff.py --index /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1.mm9.gff /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/indexed Indexing GFF... /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1.mm9.gff appears to already be indexed. Aborting. Executing: python /usr/local/lib/python2.7/dist-packages/misopy/run_events_analysis.py --compute-genes-psi /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/indexed /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam --output-dir /usr/local/lib/python2.7/dist-packages/misopy/test-output/gene-psi-output --read-len 36 --paired-end 250 30 --use-cluster MISO (Mixture of Isoforms model) To run MISO, please use "miso" instead. .Testing single-end SE event interface... Executing: python /usr/local/lib/python2.7/dist-packages/misopy/run_events_analysis.py --compute-events-psi se-sample /usr/local/lib/python2.7/dist-packages/misopy/test-data/se-counts/se_test.counts --output-dir /usr/local/lib/python2.7/dist-packages/misopy/test-output/SE-output --read-len 35 --overhang-len 4 --event-type SE --use-cluster MISO (Mixture of Isoforms model) To run MISO, please use "miso" instead. .Testing fr-unstranded... Checking read f_read against + Checking read f_read against - Checking read r_read against + Checking read r_read against - Testing fr-firststrand... .Testing conversion of SAM to BAM... Executing: sam_to_bam --convert /usr/local/lib/python2.7/dist-packages/misopy/test-data/sam-data/c2c12.Atp2b1.sam /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output Converting SAM to BAM... - Executing: samtools view -Sbh /usr/local/lib/python2.7/dist-packages/misopy/test-data/sam-data/c2c12.Atp2b1.sam > /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.bam Sorting BAM file... - Executing: samtools sort /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.bam /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted [bam_sort] Use -T PREFIX / -o FILE to specify temporary and final output files Usage: samtools sort [options...] [in.bam] Options: -l INT Set compression level, from 0 (uncompressed) to 9 (best) -m INT Set maximum memory per thread; suffix K/M/G recognized [768M] -n Sort by read name -o FILE Write final output to FILE rather than standard output -T PREFIX Write temporary files to PREFIX.nnnn.bam -@, --threads INT Set number of sorting and compression threads [1] --input-fmt-option OPT[=VAL] Specify a single input file format option in the form of OPTION or OPTION=VALUE -O, --output-fmt FORMAT[,OPT[=VAL]]... Specify output format (SAM, BAM, CRAM) --output-fmt-option OPT[=VAL] Specify a single output file format option in the form of OPTION or OPTION=VALUE --reference FILE Reference sequence FASTA FILE [null] Indexing BAM... - Executing: samtools index /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam [E::hts_open_format] fail to open file '/usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam' samtools index: failed to open "/usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam": No such file or directory Conversion took 0.00 minutes. FTesting gene-level Psi... Testing GFF indexing of: /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1.mm9.gff Executing: index_gff --index /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1.mm9.gff /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1/indexed Indexing GFF... /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1.mm9.gff appears to already be indexed. Aborting. Executing: miso --run /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1/indexed /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam --output-dir /usr/local/lib/python2.7/dist-packages/misopy/test-output/gene-psi-output --read-len 36 MISO (Mixture of Isoforms model) Probabilistic analysis of RNA-Seq data for detecting differential isoforms Use --help argument to view options.Using MISO settings file: /usr/local/lib/python2.7/dist-packages/misopy/settings/miso_settings.txt Computing Psi values... - GFF index: /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1/indexed - BAM: /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam - Read length: 36 - Output directory: /usr/local/lib/python2.7/dist-packages/misopy/test-output/gene-psi-output Checking your GFF annotation and BAM for mismatches... Error: BAM /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam cannot be found. 08/20/2016 05:33:07 AM - miso_main - ERROR - BAM file /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam not found.
. FAIL: test_a_sam_to_bam (misopy.test_miso.TestMISO) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/misopy/test_miso.py", line 51, in test_a_sam_to_bam "c2c12.Atp2b1.sorted.bam"))) AssertionError
Ran 5 tests in 1.192s
FAILED (failures=1)