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

NameError: global name 'sort' is not defined #34

Open
Tinalxt opened this issue Mar 24, 2017 · 7 comments
Open

NameError: global name 'sort' is not defined #34

Tinalxt opened this issue Mar 24, 2017 · 7 comments

Comments

@Tinalxt
Copy link

Tinalxt commented Mar 24, 2017

Hi~ I had the same problem metioned in #30, but when I run the example_data with version 0.0.6, I got a new problem, just like below:
1 Traceback (most recent call last):
2 File "/Workspace/home/difanglei/pipeline/ctDNA/software/BreaKmer-0.0.6/breakmer.py", line 96, in
3 r.run(tic)
4 File "/Workspace/home/difanglei/pipeline/ctDNA/software/BreaKmer-0.0.6/sv_processor.py", line 189, in run
5 trgt.extract_bam_reads() # Extract the reads that provide evidence for structural variation.
6 File "/Workspace/home/difanglei/pipeline/ctDNA/software/BreaKmer-0.0.6/sv_processor.py", line 537, in extract_bam_reads
7 sort(self.files['sv_bam'],self.files['sv_bam_sorted'].replace('.bam',''))
8 NameError: global name 'sort' is not defined
I wonder if it is a new bug? And how can I fix it. Thank you~

@GuillaumeMEXP
Copy link

Hi,

I get the same error, did you manage to solve it ?

Thanks !

@ryanabo
Copy link
Collaborator

ryanabo commented Dec 7, 2017

Hello! Sorry about the troubles. This error is new to me (as the main developer) and I am wondering what version of python you are using.

@ryanabo
Copy link
Collaborator

ryanabo commented Dec 7, 2017

Please try my branched version - https://github.com/ryanabo/BreaKmer

@GuillaumeMEXP
Copy link

GuillaumeMEXP commented Dec 8, 2017 via email

@ryanabo
Copy link
Collaborator

ryanabo commented Dec 8, 2017

Hi Will,

I will address this here but would appreciate if you posted the issue in the repo from which the code was downloaded. I don't get notices on this repo anymore so I could easily miss your issues. As for your current issue, I am suspecting your bam is not being read properly. Can you copy and paste a handful of the sequence reads from the bam file that are aligned? This could easily be a formatting issue and my code is not robust to it, but should be an easy fix.

Ryan

@GuillaumeMEXP
Copy link

GuillaumeMEXP commented Dec 10, 2017 via email

@Myno-Jeong
Copy link

Hi.

I also had the same problem with Tinalxt.
1 Traceback (most recent call last):
2 File "/Workspace/home/difanglei/pipeline/ctDNA/software/BreaKmer-0.0.6/breakmer.py", line 96, in
3 r.run(tic)
4 File "/Workspace/home/difanglei/pipeline/ctDNA/software/BreaKmer-0.0.6/sv_processor.py", line 189, in run
5 trgt.extract_bam_reads() # Extract the reads that provide evidence for structural variation.
6 File "/Workspace/home/difanglei/pipeline/ctDNA/software/BreaKmer-0.0.6/sv_processor.py", line 537, in extract_bam_reads
7 sort(self.files['sv_bam'],self.files['sv_bam_sorted'].replace('.bam',''))
8 NameError: global name 'sort' is not defined
I sorted my bam file using gatk SortSam module.

I couldn't solve this problem.
I used BreakMer version 0.0.7 and python 2.7.6.

Would you let me know how I can solve this problem?

Many thanks,

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

4 participants