Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Counting the number of paralogues for mouse genes gives me the wrong frequency

    I am trying to count the number of paralogues for the mouse homologues of the human protein-coding genes using BioMart. But for example in the 'PLIN4' gene its counting 35,000 paralogues instead of 4.

    We think it is because some genes have one to many paralogues which causes repeats. When I run a single gene its gives me back the correct number of paralogues. Is there a way to either remove these repeats from the results or a way around this so that BioMart doesn't output these repeats.

    I have also thought of maybe running one gene at a time, then counting it by setting up some sort of loop so that it does all of the genes from the list automatically.

    The code I have written so far is:


    Code:
    # Load the biomaRt package:
    
    library(biomaRt)
    ensembl_hsapiens <- useMart("ensembl", 
                              dataset = "hsapiens_gene_ensembl")
    ensembl_mouse <- useMart("ensembl", 
                           dataset = "mmusculus_gene_ensembl")
    
    # Get all human protein coding genes:
    
    hsapien_PC_genes <- getBM(attributes = c("ensembl_gene_id", 
                                             "external_gene_name"), 
                              filters = "biotype", 
                              values = "protein_coding", 
                              mart = ensembl_hsapiens)
    
    
    ensembl_gene_ID <- hsapien_PC_genes$ensembl_gene_id
    
    # Get mouse homologues
    
    mouse_homologues <- getBM(attributes = c("ensembl_gene_id", "external_gene_name", 
                                           "mmusculus_homolog_associated_gene_name"), 
                            filters = "ensembl_gene_id", 
                            values = c(ensembl_gene_ID), 
                            mart = ensembl_hsapiens)
    
    # Get mouse external gene name 
    
    mouse_homologues_external_gene_names <- mouse_homologues$mmusculus_homolog_associated_gene_name
    
    
    mouse_paralogues <- getBM(attributes = c("hsapiens_homolog_associated_gene_name",
                                           "external_gene_name",
                                           "mmusculus_paralog_associated_gene_name"), 
                            filters = "external_gene_name", 
                            values = c(mouse_homologues_external_gene_names) , mart = ensembl_mouse)
    
    # Remove genes with no paralogues 
    mouse_paralogs_data <- mouse_paralogues[!is.na(mouse_paralogues$mmusculus_paralog_associated_gene_name)
                                              | mouse_paralogues$mmusculus_paralog_associated_gene_name==""), ]
    
    # Count paralogues per gene
    
    library(plyr)
    count_mouse_paralogues <- count(mouse_paralogs_data, "external_gene_name")
    View(count_mouse_paralogues)

Latest Articles

Collapse

  • seqadmin
    Exploring the Dynamics of the Tumor Microenvironment
    by seqadmin




    The complexity of cancer is clearly demonstrated in the diverse ecosystem of the tumor microenvironment (TME). The TME is made up of numerous cell types and its development begins with the changes that happen during oncogenesis. “Genomic mutations, copy number changes, epigenetic alterations, and alternative gene expression occur to varying degrees within the affected tumor cells,” explained Andrea O’Hara, Ph.D., Strategic Technical Specialist at Azenta. “As...
    07-08-2024, 03:19 PM
  • seqadmin
    Exploring Human Diversity Through Large-Scale Omics
    by seqadmin


    In 2003, researchers from the Human Genome Project (HGP) announced the most comprehensive genome to date1. Although the genome wasn’t fully completed until nearly 20 years later2, numerous large-scale projects, such as the International HapMap Project and 1000 Genomes Project, continued the HGP's work, capturing extensive variation and genomic diversity within humans. Recently, newer initiatives have significantly increased in scale and expanded beyond genomics, offering a more detailed...
    06-25-2024, 06:43 AM

ad_right_rmr

Collapse

News

Collapse

Topics Statistics Last Post
Started by seqadmin, 07-10-2024, 07:30 AM
0 responses
23 views
0 likes
Last Post seqadmin  
Started by seqadmin, 07-03-2024, 09:45 AM
0 responses
200 views
0 likes
Last Post seqadmin  
Started by seqadmin, 07-03-2024, 08:54 AM
0 responses
209 views
0 likes
Last Post seqadmin  
Started by seqadmin, 07-02-2024, 03:00 PM
0 responses
192 views
0 likes
Last Post seqadmin  
Working...
X