Description Usage Arguments Details Value Author(s) See Also Examples
These function allow to create MTI (miRNA target gene interaction) objects from data.frames) or to export the contents of a MTI object (along with the stored Report object(s)) as a (single or multi-row) data.frame.
1 2 3 | data.frame2mti( x, colname.id="mirtarbase_id", colname.mirna="mirna", colname.mirna.species="species_mirna", colname.target="target_gene", colname.target.entrezid="target_gene_entrez_gene_id", colname.target.species="species_target_gene", do.unique=TRUE )
mti2data.frame( x, colname.id="mirtarbase_id", colname.mirna="mirna", colname.mirna.species="species_mirna", colname.target="target_gene", colname.target.entrezid="target_gene_entrez_gene_id", colname.target.species="species_target_gene", collapse.reports=NULL, stringsAsFactors=FALSE, row.names=NULL )
|
x |
|
colname.id |
the column name in the data.frame containing the miRTarBase identifiers. |
colname.mirna |
the column name in the data.frame containing the mature miRNA name. |
colname.mirna.species |
the column name in the data.frame containing the species name of the miRNA. |
colname.target |
the column name in the data.frame containing the target gene's official symbol. |
colname.target.entrezid |
the column name in the data.frame containing the target gene's NCBI Entrezgene identifier. |
colname.target.species |
the column name in the data.frame containing the species of the target gene. |
do.unique |
whether a unique list of MTI objects should be generated from the data.frame. |
collapse.reports |
if not NULL multiple reports providing evidence
for the MTI are joined into a single row for the MTI, with the
character provided by |
stringsAsFactors |
whether character strings should be automatically converted to factors. |
row.names |
would allow to set the row.names of the data.frame. |
This are helper functions that allow to transform data.frames into objects and vice versa.
A data.frame or a list of MTI objects.
Johannes Rainer
data.frame2report
, report2data.frame
,
MTI
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## get all miRNA target gene interactions (MTI) for BCL2L11 using a SQL
## query.
## Note, that we get the same MTI in multiple rows, if this MTI has been
## described in more than one publication:
con <- getMtiCon()
Res <- dbGetQuery( con, "select * from mirtarbase where target_gene='BCL2L11'" )
## the same MTI, but more than one publication.
Res[ Res$mirtarbase_id=="MIRT001206", c( "mirna", "target_gene", "references_pmid" ) ]
## create a list of MTI objects.
## Note that the reports are NOT added to the report slot of the MTI objects.
MTIs <- data.frame2mti( Res )
nrow( Res )
length( MTIs )
## MTIs contains only unique list of MTIs
## convert it again to a data.frame
DF <- do.call( "rbind", lapply( MTIs, mti2data.frame ) )
nrow( DF )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.