Skip to content

Issue with QDNAseq Segmentation Output Formatting #134

@jihen-lau

Description

@jihen-lau

Description:
I encountered an issue while running QDNAseq in R and generating .seg files. To be exact, some of the files did not follow the expected structure. Instead of having six column headers followed by data entries, these files were formatted incorrectly, appearing as six rows with a single column where the header is labeled as 'x'.

Expected .seg Format:

SAMPLE_NAME	CHROMOSOME	START	STOP	DATAPOINTS	LOG2_RATIO_MEAN
Sample1    3    56200001    69000000    28    0.55

Observed Incorrect Format:

x
sample1.seg
3
56200001
69000000
28
0.55

Even when running only these problematic files individually, the outcome remains the same (i.e., six rows with a single column header labeled as 'x').

Additional Observations:

To manually verify the issue, I exported the call number and compared it to the number of data points in the .seg file. Based on this comparison:

  • 6 out of the 7 affected files having only 1 segment.
  • 1 affected file should have recorded 3 segments but instead only recorded 1, in the incorrect format.

My Script:

library(QDNAseq)
library(QDNAseq.hg19)

bins <- getBinAnnotations(binSize=100)

setwd("/my_Dir/") 
readCounts <- binReadCounts(bins)

readCountsFiltered <- applyFilters(readCounts, residual=TRUE, blacklist=TRUE)
readCountsFiltered <- estimateCorrection(readCountsFiltered)
copyNumbers <- correctBins(readCountsFiltered)
copyNumbersNormalized <- normalizeBins(copyNumbers)
copyNumbersSmooth <- smoothOutlierBins(copyNumbersNormalized)

# more limit
options(future.globals.maxSize = 1024^3)

# set seeds
set.seed(1)

copyNumbersSegmented <- segmentBins(copyNumbersSmooth, transformFun="sqrt")
copyNumbersSegmented <- normalizeSegmentedBins(copyNumbersSegmented)
copyNumbersCalled <- callBins(copyNumbersSegmented)

exportBins(copyNumbersCalled,file="%s.seg", format="seg")

System Information:

  • QDNAseq Version: ‘1.38.0’
  • R Version: R version 4.3.3
  • Operating System: AWS EC2 Ubuntu 22.04, m6a.2xlarge

Any insights or guidance on how to resolve this issue would be greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions