Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

funannotate train - symlink error: file exists #189

Closed
timkahlke opened this issue Jul 3, 2018 · 4 comments
Closed

funannotate train - symlink error: file exists #189

timkahlke opened this issue Jul 3, 2018 · 4 comments

Comments

@timkahlke
Copy link

When trying to run funannotate train I get
funannotate-train.py", line 759, in <module> os.symlink(os.path.realpath(l_reads), os.path.join(tmpdir, 'left.fq.gz') File exists

I think the problem is that the check in line 758 is always false: tmpdir != l_reads because l_reads is the file and tmpdir the directory l_reads is in (743: l_reads = os.path.join(tmpdir, 'left'+ending)). However, l_reads already exists when giving multiple input fastq files due to the concatenation in line 747 & 748.

When re-starting funannotate it ignores it and goes on.

@nextgenusfs
Copy link
Owner

Okay I will look at it.

if os.path.dirname(os.path.abspath(tmpdir)) != os.path.dirname(os.path.abspath(l_reads)):

This line is checking the directory path - i.e. if the the l_reads directory is same as temp directory then the file is where it is suppose to be, if it is not (!=) then make a symlink.

I see that upstream you refer to l_reads being defined, yes I can nest that in the following for loop but it shouldn't matter as if there are multiple inputs they get concatenated and stored at os.path.join(tmpdir, 'left.fq') if there are not multiple, then l_reads variable is overwritten by the left_reads[0]

What was your command that caused the error? Multiple inputs? Are the inputs symlinks by chance? And when you re-issue the command, this routine gets bypassed...

@timkahlke
Copy link
Author

My bet. Overlooked a "file not found" in the log and also that you're checking for dirname not complete path.

Thanks, will close the issue.

@nextgenusfs
Copy link
Owner

Okay... you were right, I ran into this same error I think. Will be fixed in v1.4.2 release. In the meantime, can just re-issue same command and it will run through (as you stated above).

nextgenusfs pushed a commit that referenced this issue Jul 14, 2018
@timkahlke
Copy link
Author

I ran into it again, too, but forgot to flag it. However, only a minor thing and rest seems to be working very nice! Thanks for a great tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants