BAMtoGFF issue..again

Issue #23 closed
Peter McErlean created an issue

HI ROSE team,

ROSE runs perfect on old MAC but trying to install and run test data set on new MAC and getting this error;

Traceback (most recent call last):

File "ROSE_bamToGFF.py", line 247, in <module> main() File "ROSE_bamToGFF.py", line 238, in main Traceback (most recent call last): File "ROSE_bamToGFF.py", line 247, in <module> newGFF = mapBamToGFF(bamFile,gffFile,options.sense,int(options.extension),options.floor,options.rpm,options.matrix) File "ROSE_bamToGFF.py", line 40, in mapBamToGFF MMR= round(float(bam.getTotalReads('mapped'))/1000000,4) TypeError: float() argument must be a string or a number main() File "ROSE_bamToGFF.py", line 238, in main newGFF = mapBamToGFF(bamFile,gffFile,options.sense,int(options.extension),options.floor,options.rpm,options.matrix) File "ROSE_bamToGFF.py", line 40, in mapBamToGFF MMR= round(float(bam.getTotalReads('mapped'))/1000000,4) TypeError: float() argument must be a string or a number

I know that samtools needs to be downloaded and in PATH for bamtoGFF to work.

I've installed samtools 1.2 via HomeBrew: - puts it in /usr/local/Cellar but samtools is present in /usr/local/bin

Plus installed manually into a subfolder inline with the ROSE scripts: -/Users/analysiscomputer/ROSE/bin

Check and add to PATH:

Analysiss-iMac:~ analysiscomputer$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin Analysiss-iMac:~ analysiscomputer$ export PATH=$PATH:/Users/analysiscomputer/ROSE/bin Analysiss-iMac:~ analysiscomputer$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/analysiscomputer/ROSE/bin

Run TEST data: python /Users/analysiscomputer/ROSE_main.py -g hg18 -i /Users/analysiscomputer/ROSE/data/HG18_MM1S_MED1.gff -r /Users/analysiscomputer/ROSE/data/MM1S_MED1.hg18.bwt.sorted.bam -o /Users/analysiscomputer/ROSE/TEST_DATA/PM_TEST -t 2000 -c /Users/analysiscomputer/ROSE/data/MM1S_MED1.hg18.bwt.sorted.bam.bai

Still get same error.

You mentioned in a previous post that you can edit the code to point ROSE in the right direction of samtools. Im not code savvy so how exactly do you do it?

Just find it puzzling how it works fine on one MAC and not the other.

Any ideas?

Thanks

Peter

Comments (3)

  1. Brian Abraham

    Hi Peter,

    This error does not suggest that samtools is not installed correctly. Usually this means the GFF or bam file are incorrectly formatted.

  2. Log in to comment