Question: Retrieve GO terms ontology
0
gravatar for romain.lannes
3.2 years ago by
romain.lannes80 wrote:

Hi, I have a list of 141 GO terms. I downloaded them from biomart ensembl (GOAslim). I want to know if there is an easy way to have their top ontology(cellular component, molecular function, biological process). For each term I would like to have:

GO:XXXXXX1 is a cellular component

GO:XXXXXX2 is a molecular function

GO:XXXXXX3 is a biological process

I have made some research but I havn't found easy way to do it. Before going to "complicate job" I wonder if there is a simple way, or a tools to doing this.

go • 1.6k views
ADD COMMENTlink modified 3.2 years ago by biocyberman770 • written 3.2 years ago by romain.lannes80
5
gravatar for Pierre Lindenbaum
3.2 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum120k wrote:

Using bash and quickgo:

function fun1
    {
    TERM=`curl -s "https://www.ebi.ac.uk/QuickGO/GTerm?id=${1}&format=oboxml" | xmllint --xpath 'normalize-space(//is_a[1]/text())' - `
    if [[ ${TERM} == "" ]] ; then echo "$1" ; else   fun1 "${TERM}" ; fi
    }

while read A
do
    echo -n "${A} "
    fun1 "${A}"
done

example:

echo -e "GO:0003674\nGO:0097159" | bash go.sh
GO:0003674 GO:0003674
GO:0097159 GO:0003674
ADD COMMENTlink written 3.2 years ago by Pierre Lindenbaum120k
1

Keep getting amazed of your xml manipulation fluency.

ADD REPLYlink written 3.2 years ago by biocyberman770

Thanks that exactly what I was looking for! you get me out of trouble .

ADD REPLYlink written 3.2 years ago by romain.lannes80
2
gravatar for biocyberman
3.2 years ago by
biocyberman770
Denmark
biocyberman770 wrote:

Check out GOParGenPy tool or download the annotation file for your species and extract information with gawk or your favorite language: http://geneontology.org/page/download-annotations

The data is in Geneontology Annotation Format: http://geneontology.org/page/go-annotation-file-format-20 And the columns you want to extract are column 5 and 9.

ADD COMMENTlink modified 3.2 years ago • written 3.2 years ago by biocyberman770

thanks for your answers but I already have GO annotation for a subset of gene. My trouble was to know in which ontology they are (cellular component, molecular function, biological process).

ADD REPLYlink modified 3.2 years ago • written 3.2 years ago by romain.lannes80
2

Hi, please use following steps in R:

ids <- c("GO:2000096", "GO:2000145", "GO:2001020")  #### your GO ids
    library(GO.db)
    head(select(GO.db, ids, "ONTOLOGY"))
    output will be:
            GOID ONTOLOGY
    1 GO:2000096       BP
    2 GO:2000145       BP
    3 GO:2001020       BP

where
BP= biological process
MF= molecular function

etc... Hope this will help you..

ADD REPLYlink modified 3.2 years ago • written 3.2 years ago by Mike1.3k

thanks for you answer I already have my result with Pierre Lindenbaum answer but it is always nice to discover new library!

ADD REPLYlink written 3.2 years ago by romain.lannes80
1

Just to clarify: GOParGenPy: Despite the name, the tools is actually more useful to extract annotation and combine various annotation information. Both using GOParGenPy and the manual method can save running time and make you less dependent on the queries over internet.

ADD REPLYlink written 3.2 years ago by biocyberman770

It is a very interresting tool thanks again !

ADD REPLYlink modified 3.2 years ago • written 3.2 years ago by romain.lannes80
Please log in to add an answer.

Help
Access

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