Skip to content

Commit

Permalink
fix: Issue #106 (#110)
Browse files Browse the repository at this point in the history
* fix: clear qualities from mcol to remove needless warning
  • Loading branch information
ahl27 authored Oct 17, 2024
1 parent f292546 commit 13ae854
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/QualityScaledXStringSet.R
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ readQualityScaledDNAStringSet <- function(filepath,
nrec, skip, seek.first.rec,
use.names, with.qualities=TRUE)
qualities <- mcols(x)[ , "qualities"]
## Clear out the qualities parameter from the DNAStringSet,
## since it gets passed into the QualityScaledDNAStringSet
## constructor via quals anyway
## (otherwise we get a warning that doesn't make sense)
mcols(x)[,"qualities"] <- NULL
if(ncol(mcols(x)) == 0)
mcols(x) <- NULL
quals <- switch(quality.scoring,
phred=PhredQuality(qualities),
solexa=SolexaQuality(qualities),
Expand All @@ -201,4 +208,3 @@ writeQualityScaledXStringSet <- function(x, filepath,
writeXStringSet(x, filepath, append, compress, compression_level,
format="fastq", qualities=quality(x))
}

0 comments on commit 13ae854

Please sign in to comment.