seq-scripts
seq-scripts copied to clipboard
Issue with seq-gc
Hello,
I am trying to run your gggenomes tutorial and I am having some trouble for the GC content as shown in the tutorial (here). I am using your emales.fna data and have run the protocol (with some hiccups but) successfully until this point.
I believe the issue I am having is related to samtools/bedtools, which are needed for this part of the analysis.
After installing both, I try to run:
seq-gc -Nbw 50 emales.fna > emales-gc.tsv
Actually like this, because I am running on macOS Monterey 12.2.1 Terminal:
perl seq-gc.pl -Nbw 50 emales.fna > emales-gc.tsv
And I get the error messages:
[E::fai_build3_core] Failed to open the file seq-gc [faidx] Could not build fai index seq-gc.fai cut: seq-gc.fai: No such file or directory Error: The requested fasta database file (seq-gc) could not be opened. Exiting!
I have tried running with and without the 'perl' and the '.pl', and this is the only way it recognises there is even a seq-gc to run.
Full disclosure: although I am very comfortable in R, I am not used to using any of the other languages that are present in the tutorial. Nevertheless, I have been able to run everything up until this point, which is what made me think it may be an issue with the code itself.
Thank you for your time in advance, and thank you for gggenomes! Cátia
Hi Catia,
seq-gc isn't a perl but a bash script. Try
bash seq-gc -Nbw 50 emales.fna > emales-gc.tsv
(if that works on your terminal)
And sorry for the state of the tutorial. It needs an overhaul, but I haven't had time yet.
Hello again,
So I tried that, and still got the exact same error messages.
I ran:
bash seq-gc.sh -Nbw 50 emales.fna > emales-gc.tsv
With the .sh because it said no such file if I ran without it. And got the messages:
[E::fai_build3_core] Failed to open the file seq-gc [faidx] Could not build fai index seq-gc.fai cut: seq-gc.fai: No such file or directory Error: The requested fasta database file (seq-gc) could not be opened. Exiting!
Thank you again for your time, Cátia
Hm, so I can't reproduce this on my system and I don't have a mac to try, so I'm pretty much guessing. The error is weird in the sense that the script is trying to open the actual scriptfile (seq-gc) instead of the fasta file (emales.fna) and I have no idea, why that would be. But what I also find strange is that you cannot just run ./seq-gc -h
and need to do bash seq-gc.sh
. This could be part of the problem. Can you try and run chmod +x seq-gc
on the original file. That should make it executable if it isn't already. Then ./seq-gc -h
should work.
If all of that fails, you just need the GC values to continue with the tutorial, you can read those from the bundled example data. Something like read_feats(ex("emales/emales-gc.bed"))
in R.