Learn R Programming

msarc (version 1.3.2)

msarc.loadTerms: Manipulate GO Term Lists

Description

Removing uninteresting GO terms from the list of terms relevant to a set of UniProt accessions must be done manually. msarc.saveTerms and msarc.loadTerms allow the user to save the list of GO terms from a given msarc object to a file for manual filtering, then re-load the filtered file. msarc.getTerms and msarc.filterTerms allow the user to retrieve the list of GO terms as a data frame, filter it manually, and update the msarc object with the filtered list.

Usage

msarc.saveTerms(msarc, filename="go_terms.txt")
msarc.loadTerms(msarc, filename="go_terms.txt")
msarc.getTerms(msarc)
msarc.filterTerms(msarc, keepers)

Arguments

msarc
an msarc object.
filename
the name of a file to load from or save to.
keepers
a filtered data frame from msarc.getTerms, or a vector of GO IDs to keep.

Value

  • msarc.loadTerms and msarc.filterTerms return the modified msarc object.

    msarc.saveTerms returns nothing.

    msarc.getTerms returns a 3-column data frame: GO ID, GO category name, count of the number of proteins that match this category.

Details

The file generated by msarc.saveTerms must be modified only by having complete lines containing unwanted GO terms deleted.

msarc.getTerms returns the list of GO terms as a data frame, with columns for the GO ID, name of the category, and number of proteins in this category. The user can filter this list manually, then use msarc.filterTerms to indicate which categories should be represented in the final plot. msarc.filterTerms is passed an msarc object, and either a filtered data frame from msarc.getTerms or a vector of Uniprot IDs.

Examples

Run this code
data(sample_goterms,package="msarc")
msarc.saveTerms(sample_goterms)
sample_filtered <- msarc.loadTerms(sample_goterms,"terms.txt")
tbl <- msarc.getTerms(sample_goterms)
tbl <- tbl[c("GO:0017076","GO:0030554","GO:0032553","GO:0032555","GO:0032559",
             "GO:0035639","GO:0036094","GO:0097159","GO:0017111","GO:0016462"),]
sample_filtered <- msarc.filterTerms(sample_goterms,tbl)

Run the code above in your browser using DataLab