This is a test version of Biostars. For the public version, visit https://www.biostars.org.
[Errno 13] Permission denied Reading Genome Fasta

Hello everyone,

I trying to load the fasta genome from D:\ but it seems doesn't allow me to read it from there (working with Jupyter notebook). I'm working on Windows 10 and I already changed the permissions for that specific folder, but still doesn't work.

Here the code:

import pyensembl
from pyensembl import Genome
ensembl = pyensembl.EnsemblRelease()
data = Genome(
    reference_name='GRCh38',
    annotation_name='my_genome_features',
    gtf_path_or_url='C:\\Users\\User\\AppData\\Local\\pyensembl\\Homo_sapiens.GRCh38.94.gtf',
    transcript_fasta_paths_or_urls = "D:\\DATA\\ensembl\\fasta\\")
data.index()

And the error:

PermissionError: [Errno 13] Permission denied: 'D:\\DATA\\ensembl\\fasta'

For the line of gtf_path_or_url everything works properly and can read the file , but I need to access to the fasta information to retrieve sequences and I don't have enough space in C to do it directly there. I couldn't find the solution.

Thank you in advance,

Miguel

genome windows permissions

1 answer

Solved. The problem was that must be a list with all the fasta files of the genome.

so the solution will be:

import glob

transcript_fasta_paths_or_urls=(glob.glob("D:\\DATA\\ensembl\\fasta\\*.fa"))

Log in to answer this question.