Combining GRange/VRange objects
Entering edit mode
jpluta26 • 0
Last seen 6.3 years ago

I'm working on extracting somatic signatures from a group of tumor data. I was able to do this with one dataset pretty easily, I just read in the vcf files and concatenated with c(). Example:

dat1 <- readVcfAsVRanges(file1.vcf, seqinfo(file1))

vr_1 <- mutationContext(dat1, ref)

dat2 <- readVcfAsVRanges(file2.vcf, seqinfo(file1))

vr_2 <- mutationContext(dat2, ref)

vr <- c(vr_1, vr_2)

I was able to build up the object "vr" iteratively, and run the analysis on that. Now I am working on a second dataset with the same approach, but I'm running into some trouble. When I try the c() command I get the error:

Error in .Method(..., deparse.level = deparse.level) : 
  number of columns of matrices must match (see arg 2)

So obviously theres a mismatch in the dimensions of the matrices, but I can't figure out where. The first thing I found was that one file had a single element from the Y chromosome, whereas the other did not. So

vr_1@seqinfo = 83


vr_2@seqinfo = 84

I tried to remove the entry from the VRange object. I also removed that entry from the original VCF file and reran. Now seqinfo matches, but I still get the same error.

Is there a simple way to determine where my mismatch is occuring? Thank you.

granges vranges readvcfasvranges somaticsignatures • 1.0k views
Entering edit mode
Last seen 6 months ago
United States

Possibly in the softFilterMatrix() component. That comes from the FILT column in the VCF.

Entering edit mode

this was it exactly. thank you!!


Login before adding your answer.

Traffic: 435 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6