This is a test version of Biostars. For the public version, visit https://www.biostars.org.
[ERRO] read faidx: open file.fasta.seqkit.fai: permission denied

Hello, I'm trying to extract a specific nucleotide region from a fasta sequence of a chomosome. I created a fai index using:

$ seqkit faidx file.fasta

Then I run:

$ seqkit subseq -r 1268437:1269323 file.fasta

And this is the error:

[ERRO] read faidx: open file.fasta.seqkit.fai: permission denied

Do you have an idea how to resolve it?

Thank you in advance

index seqkit subseq fai

There were no errors when you did the faidx indexing? Do you see file file.fasta.seqkit.fai created in this directory? Does it have read permissions by the account you are using?

When I run

$ seqkit faidx file.fasta

The output is:

[INFO] create FASTA index for file.fasta

In the same directory I see a file fasta.fai with reading permissions, but I don't have a file.fasta.seqkit.fai

Are you performing this operation within your home directory? (~)

No, I'm performing it in the directory in which I have the files

1 answer

Looks like you can simply use faidx to extract the subsequence you need per usage page here.

$ seqkit faidx file.fasta name_you_want_to_extract:1268437-1269323 

Log in to answer this question.