oushujun / LTR_retriever

LTR_retriever is a highly accurate and sensitive program for identification of LTR retrotransposons; The LTR Assembly Index (LAI) is also included in this package.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5813529/
GNU General Public License v3.0
176 stars 40 forks source link

add $genome permission check #125

Closed with9 closed 1 year ago

with9 commented 2 years ago

Thank you for your work. LAI did not run correctly.While running I get the following error $genome.tbl: No such file or directory After checking I found out that it is due to the permissions of the $genome file.After runing RepeatMasker -e ncbi -pa $threads -q -no_is -norna -nolow -div 40 -lib $genome.LTRlib.fa -cutoff 225 $genome i got this error.

analyzing file $genome
FastaDB::_cleanIndexAndCompact() - Error could not open file ../LTR/RM_166328.TueMay32136282022/$genome: Permission denied
 at /miniconda3/envs/lai/bin/RepeatMasker line 739.

and after chmod +w $genome , everything runs correctly

I add two line to check if $genome is writable.

oushujun commented 2 years ago

@with9 Thank you for your contribution. RepeatMasker or LTR_retriever will not write the genome file, so they do not require the genome to be writeable. You may need to make the genome readible. Can you check if making/checking the genome readible is enough?

with9 commented 2 years ago

@with9 Thank you for your contribution. RepeatMasker or LTR_retriever will not write the genome file, so they do not require the genome to be writeable. You may need to make the genome readible. Can you check if making/checking the genome readible is enough?

i think RepeatMasker will first copy the genome.fa ,during copying the permissions not modified

with@fedora /d/w/E/l/r/p/r/a/test> ll
total 9.9G
-r--r--r--. 1 with with 9.8G May 11 06:38 Es.bp.p_ctg.fa
-r--r--r--. 1 with with 115M May 11 06:38 Es.bp.p_ctg.fa.LTRlib.fa
with@fedora /d/w/E/l/r/p/r/a/test> RepeatMasker -e ncbi -pa 2 -q -no_is -norna -nolow -div 40 -lib Es.bp.p_ctg.fa.LTRlib.fa -cutoff 225 Es.bp.p_ctg.fa
RepeatMasker version 4.1.2-p1
Search Engine: NCBI/RMBLAST [ 2.11.0+ ]
Using Custom Repeat Library: Es.bp.p_ctg.fa.LTRlib.fa

Building general libraries in: /home/with/miniconda3/envs/lai/share/RepeatMasker/Libraries//general

analyzing file Es.bp.p_ctg.fa
FastaDB::_cleanIndexAndCompact() - Error could not open file /data2/with_data2/Eb_project/lai/ret_retriver/parallel/repaeatannotion/annotate_out/test/RM_1576551.WedMay110639422022/Es.bp.p_ctg.fa: Permission denied
 at /home/with/miniconda3/envs/lai/bin/RepeatMasker line 739.

with@fedora /d/w/E/l/r/p/r/a/test> ll RM_1576551.WedMay110639422022/Es.bp.p_ctg.fa                                                   
-r--r--r--. 1 with with 9.8G May 11 06:39 RM_1576551.WedMay110639422022/Es.bp.p_ctg.fa
oushujun commented 1 year ago

Thank you for your recommendatian. In general, it would require the user to make sure things are writable. But adding a check will definitely help to diagnose what may be the cause of errors.