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

SequenceContainer.py fails with missing attribute in Seq object #103

Open
Npaffen opened this issue Jul 12, 2023 · 4 comments
Open

SequenceContainer.py fails with missing attribute in Seq object #103

Npaffen opened this issue Jul 12, 2023 · 4 comments

Comments

@Npaffen
Copy link

Npaffen commented Jul 12, 2023

Describe the bug
A clear and concise description of what the bug is.

When I try to run gen_reads.py with a custom vcf for the variants to add to output some golden bam with a reduced coverage the pipeline breaks after reading the vcf.

My pipeline looks like this.

call = glue("python3 neat-genreads-master/gen_reads.py -r {reference} -R 150 -o data/1kg_hg37/bam/sample1/ --bam -v data/1kg_hg37/sample_1_chr.vcf -c 0.04")
system(call)
Using default sequencing error model.
Warning: Read length of error model (101) does not match -R value (150), rescaling model...
Using default gc-bias model.
found index hg19.fa.fai
--------------------------------
  reading input VCF...

found 4128997 valid variants in input vcf.
* 76719664 variants skipped: (qual filtered / ref genotypes / invalid syntax)
* 1524 variants skipped due to multiple variants found per position
--------------------------------
  reading chr1... 
175.558 (sec)
found 323780 valid variants for chr1 in input VCF...
161 variants skipped...
- [0] ref allele does not match reference
- [1] attempting to insert into N-region
- [160] alt allele contains non-ACGT characters
--------------------------------
  sampling reads...
[Traceback (most recent call last):
    File "neat-genreads-master/gen_reads.py", line 901, in <module>
    main()
  File "neat-genreads-master/gen_reads.py", line 624, in main
  all_inserted_variants = sequences.random_mutations()
  File "neat-genreads-master/source/SequenceContainer.py", line 591, in random_mutations
  temp = self.sequences[i].tomutable()
  AttributeError: 'Seq' object has no attribute 'tomutable'
@joshfactorial
Copy link
Collaborator

joshfactorial commented Jul 13, 2023 via email

@Npaffen
Copy link
Author

Npaffen commented Jul 13, 2023

I have the most recent biopython version installed. See :

pip install biopython update
Requirement already satisfied: biopython in /home/nils/.local/lib/python3.10/site-packages (1.81)
Requirement already satisfied: update in /home/nils/.local/lib/python3.10/site-packages (0.0.1)
Requirement already satisfied: numpy in /home/nils/.local/lib/python3.10/site-packages (from biopython) (1.23.5)
Requirement already satisfied: style==1.1.0 in /home/nils/.local/lib/python3.10/site-packages (from update) (1.1.0)
(base) nils@Gigapepe2:$ python3 --version
Python 3.10.11

@joshfactorial
Copy link
Collaborator

Actually, so what I would recommend is instead of this repo, which is no longer maintained, you check out our newest work on github.com/ncsa/NEAT. If you want to maintain the same functionality as this version, then checkout the latest release of version 3. Otherwise, you can also try version 4, which is different. I believe we've resolved this bug in that more up-to-date repo.

@joshfactorial
Copy link
Collaborator

Unless biopython overhauled their mutable sequence code again, in which case I'll have to do some more investigation. Try using the latest and post a bug on that page if it still isn't working. 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

2 participants