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

Error: Porechop could not determine barcode orientation #82

Closed
JingXia730 opened this issue Apr 1, 2019 · 3 comments
Closed

Error: Porechop could not determine barcode orientation #82

JingXia730 opened this issue Apr 1, 2019 · 3 comments

Comments

@JingXia730
Copy link

Hi,

I was trying to use Porechop for barcode demultiplexing, and got the following error and found no rearranged FASTQ in the output folder:

Error: Porechop could not determine barcode orientation

This is the command I used:

porechop -i /zfs1/jboyle/jingxia/Bd_Nc_gDNA/Bd_Nc_FASTQ/ -b /zfs1/jboyle/jingxia/Bd_Nc_gDNA/Demultiplexing_Bd_Nc/

Any advice to solve this problem?

Thank you so much!!

Jing

MarkusHaak pushed a commit to MarkusHaak/Porechop that referenced this issue Apr 11, 2019
Fix to the error message "Error: Porechop could not determine barcode orientation". I analysed the error and found out that the orientation was determined the following way: Each read in the processed fastq file is aligned against every adapter set, where there exist two seperate sets (forward and reverse) for each barcode. For each barcode set, only the best score among all alignments is stored. To determine the orientation, Porechop compares the sum of max scores of all forward sets to the sum of max scores of all reverse sets.
The problem occurs because this strategy, considering only the max scores, is highly dependent on both the read quality and the number of reads per fastq file. By analysing the cases were the error occured I discovered that both orientations of a set, in my case forward and reverse of BC11, had a max score of 100.0, meaning at least one perfectly aligning read.
As a solution to this problem, I changed the determination of orientation to comparing the sum of all scores instead of only the maximum score. This should be much more robust.
@MarkusHaak
Copy link

Hi Jing,

I encountered the same error and wrote a fix for it. I only realized this error now, but had a look at older data and saw that it was there for quite some time, leading to some substancial data loss in previous experiments.
I analysed the reasons for the error and found out that the orientation is determined the following way: Each read in the processed fastq file is aligned against every adapter set, where there exist two seperate sets (forward and reverse) for each barcode. For each barcode set, only the best score among all alignments is stored. To determine the orientation, Porechop compares the sum of max scores of all forward sets to the sum of max scores of all reverse sets.
The problem occurs because this strategy, considering only the max scores, is highly dependent on both the read quality and the number of reads per fastq file. By analysing the cases were the error occured I discovered that both orientations of a set, in my case forward and reverse of BC11, had a max score of 100.0, meaning at least one read aligned perfectly.
As a solution to the problem, I changed the determination of orientation to comparing the sum of all scores instead of only the maximum score. This should be much more robust.

I hope that this solves your problems as well.

Best,
Markus

@JingXia730
Copy link
Author

Thanks Markus!

Jing

@RCWilliams
Copy link

I'm sorry, I know that this is now closed but I have the same error for barcode 10. Please is anybody able to explain how to implement this fix? My code looks like this:

porechop -i /barcode10 -b . --verbosity 2

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

3 participants