Clinical-Genomics / genmod

Annotate models of genetic inheritance patterns in variant files (vcf files)
http://moonso.github.io/genmod/
MIT License
74 stars 17 forks source link

IOError: [Errno 13] Permission denied: u'/Lib.....genes.db' #11

Closed tzhughes closed 10 years ago

tzhughes commented 10 years ago

Tried the freshest code and get IOError: [Errno 13] Permission denied: u'/Library/Python/2.7/site-packages/genmod-1.01-py2.7.egg/annotations/genes.db'

But it runs if I use sudo.

Here are the details:

/Users/timothyh/home/proj_genmod/genmodRepo/scripts/run_genmod.py -v -at gtf -an ../Homo_sapiens.GRCh37.75_partChr1andX.gtf standardTrioMissingFather.fam truePositives.vcf 
Parsing annotation ...

Number of genes in annotation file: 436
Traceback (most recent call last):
  File "/Users/timothyh/home/proj_genmod/genmodRepo/scripts/run_genmod.py", line 327, in <module>
    main()
  File "/Users/timothyh/home/proj_genmod/genmodRepo/scripts/run_genmod.py", line 242, in main
    gene_trees, exon_trees = get_annotation(args)
  File "/Users/timothyh/home/proj_genmod/genmodRepo/scripts/run_genmod.py", line 74, in get_annotation
    zipped=anno_zipped, splice_padding = args.splice_padding[0], verbosity=args.verbose)
  File "/Library/Python/2.7/site-packages/genmod-1.01-py2.7.egg/genmod/utils/annotation_parser.py", line 137, in __init__
    with open(gene_db, 'wb') as f:
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py", line 881, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 13] Permission denied: u'/Library/Python/2.7/site-packages/genmod-1.01-py2.7.egg/annotations/genes.db'
moonso commented 10 years ago

Yes I noticed this and as long as the user have sudo rights it is not a problem. In the next update it will be possibe to choose where the annotation should be stored to avoid this problem. But default for GENMOD, if no files are specfied, would allways be to check in that folder.

My idea with this is that it should be as easy as possible to just download and run the application.

tzhughes commented 10 years ago

Sounds like a good idea to make it as self-contained as possible. :thumbsup: