Open GoogleCodeExporter opened 9 years ago
[deleted comment]
karl@probook-debian:~/Lab/NGS_Unit/Software/rnaseq/rseqc/RSeQC/bin$
./bam_stat.py --version
bam_stat.py 2.3.4
karl@probook-debian:~/Lab/NGS_Unit/Software/rnaseq/rseqc/RSeQC/bin$
./bam_stat.py -i /home/karl/Lab/NGS_Unit/Runs/2013-01-10\ RNA\
Seq/one/R_2013_01_09_10_33_23_user_SN1-34_Auto_user_SN1-34_33.bam
BAM/SAM file has no header section. Exit!
karl@probook-debian:~/Lab/NGS_Unit/Software/rnaseq/rseqc/RSeQC/bin$
Original comment by karl.kas...@gmail.com
on 10 Jan 2013 at 9:25
seems to be a problem with the bam header, this i get when i run it on the same
bam file after conversion to sam:
karl@probook-debian:~/Lab/NGS_Unit/Software/rnaseq/rseqc/RSeQC/bin$
./bam_stat.py -i ~/Lab/NGS_Unit/Runs/2013-01-10\ RNA\ Seq/two/R_two.sam
Traceback (most recent call last):
File "./bam_stat.py", line 62, in <module>
main()
File "./bam_stat.py", line 57, in main
obj = SAM.ParseBAM(options.input_file)
File "/home/karl/Lab/NGS_Unit/Software/rnaseq/rseqc/RSeQC/lib/python2.7/site-packages/qcmodule/SAM.py", line 2319, in __init__
if len(self.samfile.header) ==0:
File "csamtools.pyx", line 1123, in csamtools.Samfile.header.__get__ (lib/pysam/csamtools.c:11562)
ValueError: unknown field code 'FO' in record 'RG'
karl@probook-debian:~/Lab/NGS_Unit/Software/rnaseq/rseqc/RSeQC/bin$
The problem is described here:
http://code.google.com/p/pysam/issues/detail?id=108 but applying these change
to csamtools.pyx before RSeQC compilation does not help.
Original comment by karl.kas...@gmail.com
on 10 Jan 2013 at 10:08
[deleted comment]
OK, got it working:
get a clean install of python 2.7
install cython by: easy_install cython
download pysam-0.7 from here
http://code.google.com/p/pysam/downloads/detail?name=pysam-0.7.tar.gz&can=2&q=
unpack pysam
Patch csamtools.pyx like described here:
http://code.google.com/p/pysam/issues/detail?id=108
run python setup.py install in the pysam directory
This will install a version of pysam that can read ion torrent files.
Then install RSeQC 2.3.4. Then go to the python site-packages directory of
RSeQC and delete all modules that are from the pysam install of RSeQC so RSeQC
uses the psam version we installed into the python installation. (just delete
the files that are also present in your python dist-packages directory)
voila now it works:
karl@probook-debian:~/Lab/NGS_Unit/Software/rnaseq/rseqc/RSeQC/bin$
./bam_stat.py -i /home/karl/Lab/NGS_Unit/Runs/2013-01-10\ RNA\
Seq/two/R_two.sam
Load SAM file ... Done
#==================================================
Total Records: 231220
QC failed: 0
Optical/PCR duplicate: 0
Non Primary Hits 0
Unmapped reads: 16102
Multiple mapped reads: 0
Uniquely mapped: 215118
Read-1: 0
Read-2: 0
Reads map to '+': 107393
Reads map to '-': 107725
Non-splice reads: 215118
Splice reads: 0
Reads mapped in proper pairs: 0
karl@probook-debian:~/Lab/NGS_Unit/Software/rnaseq/rseqc/RSeQC/bin$
easy, after 4 hrs of fiddling... :)
Original comment by karl.kas...@gmail.com
on 10 Jan 2013 at 10:37
Original issue reported on code.google.com by
karl.kas...@gmail.com
on 10 Jan 2013 at 8:55