Combining GRange/VRange objects
1
0
Entering edit mode
jpluta26 • 0
@jpluta26-9948
Last seen 8.7 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

and

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.7k views
ADD COMMENT
1
Entering edit mode
@michael-lawrence-3846
Last seen 3.0 years ago
United States

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

ADD COMMENT
0
Entering edit mode

this was it exactly. thank you!!

ADD REPLY

Login before adding your answer.

Traffic: 776 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6