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

[feat] add an option to use the sample barcode in the FASTQ header #28

Merged
merged 5 commits into from
Jan 3, 2023

Conversation

nh13
Copy link
Collaborator

@nh13 nh13 commented Dec 20, 2022

Requirements:

  1. Add command line option to specify that index sequences are in the read name header (--sample-barcode-in-fastq-header)
  2. Require that (a) no index reads are given to the tool, and (b) that the provided read structure does not have sample barcode bases
  3. Demultiplexer::demultiplex supports extracting sample barcode from read name header
  4. Update README with new option

Unit tests:

  1. Demultiplexer struct can use the sample barcode in the FASTQ header for both single index and dual index runs
  2. If given an input FASTQ, fail when a sample barcode segment in the read structure is given and when --sample-barcode-in-fastq-header is being used
  3. If given a path prefix with an index FASTQ (e.g. I2),fail when --sample-barcode-in-fastq-header is being used

Manually tested:

  1. Failed if given input FASTQs and read structure with sample barcodes while using --sample-barcode-in-fastq-header
  2. Failed if given FASTQ prefix (with an index file) while using --sample-barcode-in-fastq-header (NB: read structure inferred from file name)
  3. Succeeded if given input FASTQs and no read structure with sample barcodes while using --sample-barcode-in-fastq-header
  4. Succeeded if given FASTQ prefix (with no index files) while using --sample-barcode-in-fastq-header (NB: read structure inferred from file name)

@nh13 nh13 requested a review from tfenne December 20, 2022 07:48
@nh13 nh13 force-pushed the feature/use-sample-barcodes-in-fastq-header branch from c637a53 to 60acfc9 Compare December 20, 2022 07:49
@nh13 nh13 force-pushed the feature/use-sample-barcodes-in-fastq-header branch from 60acfc9 to fc801ba Compare December 20, 2022 07:52
Comment on lines +85 to +88
pub static DOC_LINK_AND_SUPPORT_EMAIL: &str = "
For complete documentation see: https://github.com/Singular-Genomics/singular-demux
For support please contact: care@singulargenomics.com
";
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added so I can print these upon an error message, not just in the usage.

@@ -14,6 +15,7 @@ fn main() {
let opts = setup();

if let Err(err) = run(opts) {
eprintln!("{}", DOC_LINK_AND_SUPPORT_EMAIL);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Print the link to this repo and the support email upon any error.

src/lib/demux.rs Show resolved Hide resolved
@nh13 nh13 marked this pull request as ready for review December 20, 2022 07:53
src/lib/demux.rs Outdated Show resolved Hide resolved
src/lib/demux.rs Show resolved Hide resolved
src/lib/opts.rs Outdated Show resolved Hide resolved
@nh13 nh13 merged commit 9fd3094 into main Jan 3, 2023
@nh13 nh13 deleted the feature/use-sample-barcodes-in-fastq-header branch January 3, 2023 19:29
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.

3 participants