Question: Combining GRange/VRange objects
gravatar for jpluta26
3.7 years ago by
jpluta260 wrote:

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.

ADD COMMENTlink modified 3.7 years ago by Michael Lawrence11k • written 3.7 years ago by jpluta260
Answer: Combining GRange/VRange objects
gravatar for Michael Lawrence
3.7 years ago by
United States
Michael Lawrence11k wrote:

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

ADD COMMENTlink written 3.7 years ago by Michael Lawrence11k

this was it exactly. thank you!!

ADD REPLYlink written 3.7 years ago by jpluta260
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 374 users visited in the last hour