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

Update fqfilter_v2.pl - Fix problem with multiple whitespaces in read-IDs #362

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

Conversation

darichter87
Copy link

Hi there,

hope everything is going well in sweden! :)

We recently encountered a small bug within the fqfilter script.
For read-IDs containing multiple whitespaces, only the last part (after the last whitespace) was removed due to greedy pattern matching.
Subsequently, read-IDs within the *.unmapped.bam can still contain whitespaces, which causes problems when mapping with STAR.
Adapting the pattern to just match the first non-whitespace character-set within the read-ID fixes this Problem.

Cheers,

Daniel

P.S.: A short example:
Some demultiplexing tools keep the index-combinations within the read-header. This will trigger the bug.
For this read-ID within the fastq file
@VL00118:284:AACMFY5M5:1:1101:33986:1000 1:N:0:0 ACTGAGCG:CGTGTGAT
we would get this read-ID within the unmapped bam
@VL00118:284:AACMFY5M5:1:1101:33986:1000 1:N:0:0

STAR does not throw any error but will fail to get the correct read sequences from the bam, resulting in all reads consisting of only one 'N' within any bam files produced downstream.

Fix whitespace Problem in read-IDs.
For read-IDs containing multiple whitespaces, only the last part was removed due to greedy matching of only one whitespace.
Subsequently, read-IDs within the *.unmapped.bam can contain whitespaces, which cause problems when mapping with STAR (all reads will consist of one single 'N' nucleotide).
Adapting the pattern to just match the first non-whitespace character-set within the read-ID fixes this Problem.
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.

1 participant