Answers.Body: <p>You can't determine if a gene is mitochondrial purely from its name. The simplest route would be to use the <a href="http://parasite.wormbase.org/biomart/martview?VIRTUALSCHEMANAME=parasite_mart&amp;ATTRIBUTES=wbps_gene.default.feature_page.production_name_1010|wbps_gene.default.feature_page.wbps_gene_id|wbps_gene.default.feature_page.external_gene_id|wbps_gene.default.feature_page.chromosome_name&amp;FILTERS=wbps_gene.default.naive_filters.species_id_1010.&quot;elegaprjna13758&quot;&amp;VISIBLEPANEL=resultspanel" rel="noreferrer">wormbase biomart</a> and either download the gene names and their associated chromosomes or use the <a href="https://bioconductor.org/packages/release/bioc/html/biomaRt.html" rel="noreferrer">biomaRt package from bioconductor</a> to do the same thing. You can upload a list of the genes you're interested in querying in either case (or just download all of them, and filter).</p>
  
  <p>From your list, only <code>nduo-1</code>, <code>nduo-6</code>, and <code>ndfl-4</code> are mitochondrial.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-14T07:49:24.380Z
Answers.LastActivityDate: 2017-12-14T07:49:24.380Z
Answers.UserDisplayName: Devon Ryan
Body: <p>I need to determine whether a gene is mitochondrial or not for C. Elegans automatically from its name by running a regular expression on a dozen of thousands of gene names. Currently I am having gene symbols like: </p>
  
  <pre><code>clec-190, clec-189, 21ur-8912, nduo-1, 21ur-6539, 21ur-13096, nduo-6, 21ur-14241, ndfl-4
  </code></pre>
  
  <p>I tried running <code>grepl("^mt-", symbols)</code> and it found nothing. I am sure that there are some mitochondrial genes just from their descriptions. I would assume that first I need to convert gene symbols to some other symbols to do that but I am not sure here.</p>
  
  <p>Basically, I am trying to do it in a similar way to the <a href="https://www.bioconductor.org/help/workflows/simpleSingleCell/" rel="nofollow noreferrer">tutorial</a> of single cell RNAseq. </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-14T00:40:00.330Z
Comments.Text: Please [edit] your question and clarify what species and what sort of gene identifier you will be using. In any case, the chances of this being the type of problem you can solve with regular expressions are vanishingly small. Is this something you will need to do once or many times? It would be much simpler to query online databases for information on the gene rather than try to parse the names.
Comments.UserDisplayName: terdon
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-14T02:36:08.240Z
Comments.Text: Ok, I added the species and a bit of clarification
Comments.UserDisplayName: Nikita Vlasenko
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-14T02:56:58.750Z
Comments.Text: I also have Worm Base identifiers for the genes if that can help
Comments.UserDisplayName: Nikita Vlasenko
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-14T13:23:52.353Z
Comments.Text: I know that the gtf files provided by illumina for C elegans use Wormbase identifiers ("WBGene*"): http://jp.support.illumina.com/sequencing/sequencing_software/igenome.html. The gtf files contain the chromosome, so with tools like grep and awk, you can easily know wheter a given identifier is from the mitochondrial chromosome.
Comments.UserDisplayName: bli
Tags: <r><rna-seq>
Title: Determine if a gene is mitochondrial or not
ThreadText: # Determine if a gene is mitochondrial or not
  
  (Asked by: username_0 on 2017-12-13)
  
  I need to determine whether a gene is mitochondrial or not for C. Elegans automatically from its name by running a regular expression on a dozen of thousands of gene names. Currently I am having gene symbols like:
  
  ```
  clec-190, clec-189, 21ur-8912, nduo-1, 21ur-6539, 21ur-13096, nduo-6, 21ur-14241, ndfl-4
  
  ```
  
  I tried running `grepl("^mt-", symbols)` and it found nothing. I am sure that there are some mitochondrial genes just from their descriptions. I would assume that first I need to convert gene symbols to some other symbols to do that but I am not sure here.
  
  Basically, I am trying to do it in a similar way to the [tutorial](https://www.bioconductor.org/help/workflows/simpleSingleCell/) of single cell RNAseq.
  
  **Tags:** r, rna-seq
  
  > **Comments:**
  > **username_1**: Please [edit] your question and clarify what species and what sort of gene identifier you will be using. In any case, the chances of this being the type of problem you can solve with regular expressions are vanishingly small. Is this something you will need to do once or many times? It would be much simpler to query online databases for information on the gene rather than try to parse the names.  
  > **username_0**: Ok, I added the species and a bit of clarification  
  > **username_0**: I also have Worm Base identifiers for the genes if that can help  
  > **username_2**: I know that the gtf files provided by illumina for C elegans use Wormbase identifiers ("WBGene*"): http://jp.support.illumina.com/sequencing/sequencing_software/igenome.html. The gtf files contain the chromosome, so with tools like grep and awk, you can easily know wheter a given identifier is from the mitochondrial chromosome.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2017-12-14. Score: 10 | Accepted answer
  
  You can't determine if a gene is mitochondrial purely from its name. The simplest route would be to use the [wormbase biomart](http://parasite.wormbase.org/biomart/martview?VIRTUALSCHEMANAME=parasite_mart&ATTRIBUTES=wbps_gene.default.feature_page.production_name_1010|wbps_gene.default.feature_page.wbps_gene_id|wbps_gene.default.feature_page.external_gene_id|wbps_gene.default.feature_page.chromosome_name&FILTERS=wbps_gene.default.naive_filters.species_id_1010."elegaprjna13758"&VISIBLEPANEL=resultspanel) and either download the gene names and their associated chromosomes or use the [biomaRt package from bioconductor](https://bioconductor.org/packages/release/bioc/html/biomaRt.html) to do the same thing. You can upload a list of the genes you're interested in querying in either case (or just download all of them, and filter).
  
  From your list, only `nduo-1`, `nduo-6`, and `ndfl-4` are mitochondrial.
  
  
  ---
  
  