Skip to content

Commit 48b5822

Browse files
committed
skip qcTarget if the data frame is empty
1 parent 9134e46 commit 48b5822

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/readNULISAseq.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ readNULISAseq <- function(file,
696696
qcXML$qcSample$sampleName <- dplyr::left_join(data.frame(sampleBarcode=qcXML$qcSample$sampleBarcode), samples, by="sampleBarcode")$sampleName
697697
}
698698

699-
if(!is.null(qcXML$qcTarget)){
699+
if(!is.null(qcXML$qcTarget) && nrow(qcXML$qcTarget) > 0){
700700
qcXML$qcTarget <- dplyr::rename(qcXML$qcTarget, targetBarcode=dplyr::any_of("sample"))
701701
qcXML$qcTarget$QCoperator <- qcXML$TargetThresh$operators[qcXML$qcTarget$flagName]
702702
qcXML$qcTarget$QCthreshold <- qcXML$TargetThresh$thresholds[qcXML$qcTarget$flagName]

0 commit comments

Comments
 (0)