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

Error faidx could not get contig length for contig {1} #1082

Open
lidi4 opened this issue May 12, 2023 · 5 comments
Open

Error faidx could not get contig length for contig {1} #1082

lidi4 opened this issue May 12, 2023 · 5 comments

Comments

@lidi4
Copy link

lidi4 commented May 12, 2023

Hello,

I've looked through each of the previous issues with this same error and haven't been able to find a solution that will work for me. I'm trying to polish my assembly (produce by Flye/metaFlye from ONT metagenomic dataset).

This is my current full command:

python3 ./scripts/nanopolish_makerange.py assembly.fasta | parallel --results nanopolish.results -P 8 \ 
nanopolish variants --consensus -o polished.{1}.vcf -w {1} -r SRR12390956.fasta.index -b ~/remapping/aln-se.sorted.bam -g renamedassembly.fasta --min-candidate-frequency 0.1

I have tried different naming conventions within the assembly/contig file including :

>contig_1 (original format)
ATCG....

1
ATCG...

>contig_1:ATCG...

with no luck, all the same error. The first portion of the command, before "nanopolish variants --consensus" is called, works fine it seems.
I have 26 (or 28?) contigs in the assembly file. I was not able to use "nanopolish index" to index the fast5 file because I unfortunately do not have access to the fast5 file. I don't know how much that matters?

I am working on Ubuntu 20.04.6 LTS with WSL2

Please let me know what else information would be helpful, as I am not the most experienced! And thank you for any advice.

@lidi4 lidi4 closed this as not planned Won't fix, can't repro, duplicate, stale May 12, 2023
@lidi4 lidi4 reopened this May 12, 2023
@jts
Copy link
Owner

jts commented May 12, 2023

I was not able to use "nanopolish index" to index the fast5 file because I unfortunately do not have access to the fast5 file. I don't know how much that matters?

Without the fast5s you'll be unable to run nanopolish since it requires access to the signal data. I recommend medaka instead.

@lidi4
Copy link
Author

lidi4 commented May 12, 2023

Ok, so even though I have the reads in fasta (ignore the ".index" portion that was a mistake) for the portion of nanopolish I put above, I am still missing some sort of information that nanopolish would have given? I didn't realize there could be differences in information in fasta files

@jts
Copy link
Owner

jts commented May 12, 2023

What is the exact error message that you got?

@lidi4
Copy link
Author

lidi4 commented May 16, 2023

my exact error message is just
error: faidx could not get contig length for contig {1}

@jts
Copy link
Owner

jts commented Jun 16, 2023

The {1} token is supposed to be replaced with the contig name by parallel. Perhaps there is a problem with how you're calling parallel?

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