Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError and png error #3

Open
hwick opened this issue Aug 26, 2020 · 1 comment
Open

TypeError and png error #3

hwick opened this issue Aug 26, 2020 · 1 comment

Comments

@hwick
Copy link

hwick commented Aug 26, 2020

Hello,
I am using python 2.7 to and R 3.3.1 run Rose, and getting the following type error:

PAUSING TO MAP
{'matrix': '1', 'extension': '200', 'floor': '1', 'sense': 'both', 'output': 'example/mappedGFF/HG18_MM1S_MED1_12KB_STITCHED_TSS_DISTAL_MM1S_MED1.hg18.bwt.sorted.bam_MAPPED.gff', 'bam': './data/MM1S_MED1.hg18.bwt.sorted.bam', 'rpm': True, 'input': 'example/gff/HG18_MM1S_MED1_12KB_STITCHED_TSS_DISTAL.gff'}
[]
mapping to GFF and making a matrix with fixed bin number
Traceback (most recent call last):
  File "ROSE_bamToGFF.py", line 247, in <module>
    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
{'matrix': '1', 'extension': '200', 'floor': '1', 'sense': 'both', 'output': 'example/mappedGFF/HG18_MM1S_MED1_MM1S_MED1.hg18.bwt.sorted.bam_MAPPED.gff', 'bam': './data/MM1S_MED1.hg18.bwt.sorted.bam', 'rpm': True, 'input': './data/HG18_MM1S_MED1.gff'}
[]
mapping to GFF and making a matrix with fixed bin number
Traceback (most recent call last):
  File "ROSE_bamToGFF.py", line 247, in <module>
    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
{'matrix': '1', 'extension': '200', 'floor': '1', 'sense': 'both', 'output': 'example/mappedGFF/HG18_MM1S_MED1_12KB_STITCHED_TSS_DISTAL_MM1S_WCE.hg18.bwt.sorted.bam_MAPPED.gff', 'bam': './data/MM1S_WCE.hg18.bwt.sorted.bam', 'rpm': True, 'input': 'example/gff/HG18_MM1S_MED1_12KB_STITCHED_TSS_DISTAL.gff'}
[]
mapping to GFF and making a matrix with fixed bin number
Traceback (most recent call last):
  File "ROSE_bamToGFF.py", line 247, in <module>
    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
{'matrix': '1', 'extension': '200', 'floor': '1', 'sense': 'both', 'output': 'example/mappedGFF/HG18_MM1S_MED1_MM1S_WCE.hg18.bwt.sorted.bam_MAPPED.gff', 'bam': './data/MM1S_WCE.hg18.bwt.sorted.bam', 'rpm': True, 'input': './data/HG18_MM1S_MED1.gff'}
[]
mapping to GFF and making a matrix with fixed bin number
Traceback (most recent call last):
  File "ROSE_bamToGFF.py", line 247, in <module>
    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
WAITING FOR MAPPING TO COMPLETE. ELAPSED TIME (MIN):
0
MAPPING TOOK 5 MINUTES

And then the following R error when the R script is called:

> png(filename=plotFileName,height=600,width=600)
Error in .External2(C_X11, paste("png::", filename, sep = ""), g$width,  : 
  unable to start device PNG
Calls: png
In addition: Warning message:
In png(filename = plotFileName, height = 600, width = 600) :
  unable to open connection to X11 display ''
Execution halted

I have XQuartz installed.
Is there a suggested workaround for these issues? I downloaded ROSE and example data from the bitbucket website.
Thank you,
Heather

@rakarnik
Copy link
Owner

rakarnik commented Aug 26, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants