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

More than one record found in handle #247

Open
ashotmarg opened this issue Jul 2, 2023 · 4 comments
Open

More than one record found in handle #247

ashotmarg opened this issue Jul 2, 2023 · 4 comments

Comments

@ashotmarg
Copy link

Hi,

Thanks a lot for creating treetime, looks like a very useful tool and I wanted to run this for reconstructing the ancestral sequences of my yeast genomes.

I run: treetime ancestral --aln myVCF.vcf.gz --vcf-reference R64-1-1.genome.fa --outdir testOut --tree myTree.newick

but I am getting an error "ValueError: More than one record found in handle" from SeqIO.

After quick googling, this page came up which seems to match the error I am getting. Do I understand correctly, that this because my reference fasta file has multiple chromosomes? I am using the R64-1-1 yeast reference genome.
If this is the case, do you know how to fix/bypass this error?

Thanks in advance!
Ashot

@rneher
Copy link
Member

rneher commented Jul 7, 2023

yes, treetime doesn't handle VCF files with multiple chromosomes at the moment. The only quick fix I could think of is to concatenate the chromosomes and transform the positions in the VCF accordingly -- sorry.

@ashotmarg
Copy link
Author

Thanks for the feedback @rneher!

I was thinking/hoping of simply extracting e.g., chromosome-1 from both the fasta and the vcf, and run only for that chromosome-1 (then of course loop over the remaining chromosomes). Unfortunately, it didn't work either... Do you think it's the vcf header related?

@rneher
Copy link
Member

rneher commented Jul 26, 2023

did you get the same error? or a different one. If your fasta sequence loads in SeqIO.read, then it should work unless there is a different problem.

@ashotmarg
Copy link
Author

I believe it was a different error, unfortunately cannot check it now, but will get back next week! Thanks.

jameshadfield added a commit that referenced this issue Dec 12, 2023
This is currently unused but a subsequent commit will allow `write_vcf`
to use this information.

As part of reading this information we now enforce:
- only one chromosome can be defined in the vcf. This will provide
a helpful error message in situations such as <#247>
- genotype calls much consistently use the same ploidy

There is a lot more checking we could do if we wish to parse the
meta-lines
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