gravatar for Researcher

4 hours ago by

Hello Everyone,

I am trying to add a new column with entrezgene_ids to a grangeslist. I matched the entrezgene_ids to the gene symbol but I got the following warning

Warning message:

In recycleSingleBracketReplacementValue(value, x, i) :
  number of values supplied is not a sub-multiple of the number of values to be replaced"

when I stored the matched results in my grangeslist, I realized that some of the rows do not have the entrezgene_ids matched to the gene symbol. Has anyone ever encountered this problem? Please help me.
This is my code to match the entrezgene_ids to gene symbols and store them in a new column in grangeslist

GenomicRanges::values([email protected])[,"entrezgene_id"] <- genes$entrezgene_id[match(txgene_df$geneName, genes$external_gene_name)]

This is part of my grangeslist:

seqnames            ranges strand |   gene_name    subclass gene_nameExon feature_type Entrezgene_id

A1BG_exon14c    chr19 58346858-58346859      - |        A1BG      noncds  A1BG_exon14c         exon             1
  A1BG_exon14b    chr19 58346860-58347021      - |        A1BG      noncds  A1BG_exon14b         exon             1
           ...      ...               ...    ... .         ...         ...           ...          ...           ...
    A1BG_exon5    chr19 58357585-58357649      - |        A1BG      noncds    A1BG_exon5         exon          <NA>
    A1BG_exon4    chr19 58357952-58358286      - |        A1BG      noncds    A1BG_exon4         exon          <NA>

Source link