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

Fix failure in tandem when trim bypassed #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zwets
Copy link

@zwets zwets commented Aug 16, 2021

With --bypass-trim a failure occurs in utilities.fastq_to_fasta(), due to generation of an invalid fasta file name in run.tandem().

The offending statement is:

input_fastq.replace(os.path.splitext(input_fastq)[-1],config.fasta_file_extension)

When input_fastq has no extension (as is the case when --bypass-trim), then this evaluates to input_fastq.replace("",".fasta"), which results in .fasta being inserted at every position in input_fastq. This generates file names such as .fasta/.fastap.fastaa.fastat.fastah.fasta/.fastaf.fastai.fastal.fastae.fasta.

This patch fixes the issue simply by appending ".fasta" to input_fastq.

Note: PR #21 fixes an independent issue which prevents the offending filename from being shown in the error message.

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

Successfully merging this pull request may close these issues.

None yet

1 participant