[R] subsetByOverlaps (Granges list and Granges object) not giving specific hits
0
0
Entering edit mode
3.8 years ago
Alewa ▴ 150

Dear Biostars,

I have GRangesList object of length 15 with metadata (of gene annotations & copy number), created small GRanges object to use to query GrangeList by subsetByOverlaps. but subsetByOverlaps seem not working for GrnagesLists, results end being same as orginial GrangesList. has anyone experienced this before? how did you resolve it? seem to work with 2 Granges objects subsetByOverlaps(grI,grII) but not GRangeslist and GRanges object.

Thanks for the help!

library(GenomicFeatures)
created small Granges object (chr8) to use for query
qr=GRanges(seqnames="8",
          ranges=IRanges(start = c(36000001,37000001,38000001,39000001,40000001,41000001,42000001), 
                         end = c(37000000,38000000,39000000,40000000,41000000,42000000,43000000)),
          strand="-")

grl.all.patients

GRangesList object of length 15:

$pP10_TNBC_G3
GRanges object with 47358 ranges and 6 metadata columns:
          seqnames              ranges strand |  Gene.stable.ID    Strand     Gene.name HGNC.symbol      Gene.type copy_number
             <Rle>           <IRanges>  <Rle> |     <character> <integer>   <character> <character>    <character>   <integer>
      [1]        1     1006346-1009687      * | ENSG00000237330        -1        RNF223      RNF223 protein_coding           2
      [2]        1     1017198-1051741      * | ENSG00000131591        -1      C1orf159    C1orf159 protein_coding           2
      ...      ...                 ...    ... .             ...       ...           ...         ...            ...         ...
  [47357]        X 150884507-150891666      * | ENSG00000147378         1         FATE1       FATE1 protein_coding           1
  [47358]        X 150906923-150913776      * | ENSG00000183862         1         CNGA2       CNGA2 protein_coding           1
  -------
  seqinfo: 24 sequences from an unspecified genome; no seqlengths

...
14 more elements

subset only small portion of chr8

chr8p.only.all.samples <- subsetByOverlaps(grl.all.patients,qr)

call subseted overlaps

chr8p.only.all.samples

GRangesList object of length 15:
$pP10_TNBC_G3
GRanges object with 47358 ranges and 6 metadata columns:
          seqnames              ranges strand |  Gene.stable.ID    Strand     Gene.name HGNC.symbol      Gene.type copy_number
             <Rle>           <IRanges>  <Rle> |     <character> <integer>   <character> <character>    <character>   <integer>
      [1]        1     1006346-1009687      * | ENSG00000237330        -1        RNF223      RNF223 protein_coding           2
      [2]        1     1017198-1051741      * | ENSG00000131591        -1      C1orf159    C1orf159 protein_coding           2
      ...      ...                 ...    ... .             ...       ...           ...         ...            ...         ...
  [47357]        X 150884507-150891666      * | ENSG00000147378         1         FATE1       FATE1 protein_coding           1
  [47358]        X 150906923-150913776      * | ENSG00000183862         1         CNGA2       CNGA2 protein_coding           1
  -------
  seqinfo: 24 sequences from an unspecified genome; no seqlengths

...
14 more elements
R GenomicFeatures bioconductor • 1.7k views
ADD COMMENT

Login before adding your answer.

Traffic: 1943 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