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 store sample base qualities in the QT for FastqToBam #933

Merged
merged 3 commits into from
Sep 1, 2023

Conversation

nh13
Copy link
Member

@nh13 nh13 commented Aug 31, 2023

Alternative to #932 to implement #931

@@ -322,6 +322,24 @@ class FastqToBamTest extends UnitSpec {
recs(3).basesString shouldBe "CCCCCCCCCC"
}

it should "extract sample barcode qualities when requested" in {
Copy link
Member Author

Choose a reason for hiding this comment

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

@galaxy001, take a look at the inputs and outputs and see if this suffices.

@codecov-commenter
Copy link

codecov-commenter commented Aug 31, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (bcb5577) 95.60% compared to head (645bf0d) 95.60%.

❗ Current head 645bf0d differs from pull request most recent head 172e0df. Consider uploading reports for the commit 172e0df to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #933   +/-   ##
=======================================
  Coverage   95.60%   95.60%           
=======================================
  Files         126      126           
  Lines        7305     7307    +2     
  Branches      517      507   -10     
=======================================
+ Hits         6984     6986    +2     
  Misses        321      321           
Flag Coverage Δ
unittests 95.60% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...n/scala/com/fulcrumgenomics/fastq/FastqToBam.scala 98.43% <100.00%> (+0.05%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -92,6 +92,7 @@ class FastqToBam
@arg(flag='s', doc="If true, queryname sort the BAM file, otherwise preserve input order.") val sort: Boolean = false,
@arg(flag='u', doc="Tag in which to store molecular barcodes/UMIs.") val umiTag: String = ConsensusTags.UmiBases,
@arg(flag='q', doc="Tag in which to store molecular barcode/UMI qualities.") val umiQualTag: Option[String] = None,
@arg(doc="Store the sample barcode qualities in the QT Tag.") val storeSampleBarcodeQualities: Boolean = false,

Choose a reason for hiding this comment

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

Why there is no flag ? What will the option char for enabling QT ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Use the full command line option --store-sample-barcode-qualities. I don't think there's a flag that makes sense, and likely since folks are implementing this in a workflow software, I don't think it's too onerous. If you really want one, I'd pick x since it's sufficiently different than the others.

Copy link
Member

Choose a reason for hiding this comment

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

I'd probably just add -Q if it were up to me

Copy link
Member

@tfenne tfenne left a comment

Choose a reason for hiding this comment

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

Requested one minor test addition.

@@ -92,6 +92,7 @@ class FastqToBam
@arg(flag='s', doc="If true, queryname sort the BAM file, otherwise preserve input order.") val sort: Boolean = false,
@arg(flag='u', doc="Tag in which to store molecular barcodes/UMIs.") val umiTag: String = ConsensusTags.UmiBases,
@arg(flag='q', doc="Tag in which to store molecular barcode/UMI qualities.") val umiQualTag: Option[String] = None,
@arg(doc="Store the sample barcode qualities in the QT Tag.") val storeSampleBarcodeQualities: Boolean = false,
Copy link
Member

Choose a reason for hiding this comment

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

I'd probably just add -Q if it were up to me

recs(2).apply[String]("BC") shouldBe "GAA-TCG"
recs(2).apply[String]("QT") shouldBe "CDE IJK"
}

Copy link
Member

Choose a reason for hiding this comment

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

Could you either add a second pass here, or assert in one of the other tests, that if you don't supply a value for storeSampleBarcodeQualities that the QT tag doesn't get set with anything?

@nh13 nh13 merged commit ab8959d into main Sep 1, 2023
@nh13 nh13 deleted the feature/fastq_to_bam_barcode_quals branch September 1, 2023 17:32
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.

4 participants