[BioC] graph object question

Iain Gallagher iaingallagher at btopenworld.com
Sat Feb 13 00:09:24 CET 2010


Thanks Vincent and Seth.

ftM2graphNEL - very sweet!

iain

--- On Fri, 12/2/10, Seth Falcon <sfalcon at fhcrc.org> wrote:

> From: Seth Falcon <sfalcon at fhcrc.org>
> Subject: Re: [BioC] graph object question
> To: bioconductor at stat.math.ethz.ch
> Date: Friday, 12 February, 2010, 23:01
> Hi Iain,
> 
> On 2/12/10 2:17 PM, Iain Gallagher wrote:
> > I'm trying to build graph objects showing the
> relationship between
> > miRNA and genes. Is there a quick way to do this from
> a dataframe
> > (see toy code below)? When building my graph object I
> can't think my
> > way through getting the 'edges' list name into my list
> of edges (see
> > below)!
> 
> I think maybe you are looking for
> graph::ftM2graphNEL.  Here's an example:
> 
> library("graph")
> s <- "symbol mirbase_id
> 2'-PDE hsa-let-7b
> A2BP1 hsa-let-7b
> AAK1 hsa-let-7b
> ABCB9 hsa-let-7b
> ABCC10 hsa-let-7b
> ABCC5 hsa-let-7b
> ACSL6 hsa-let-7b
> ACTA1 hsa-let-7b
> ACTR2 hsa-let-7b
> ACVR1B hsa-let-7b
> "
> 
> con <- textConnection(s)
> df <- read.table(con, sep = " ", quote = "", header =
> TRUE)
> ft <- as.matrix(df)
> close(con)
> g <- ftM2graphNEL(ft)
> ## or perhaps you want an undirected graph?
> gu <- ftM2graphNEL(ft, edgemode = "undirected")
> 
> + seth
> 
> -- Seth Falcon
> Bioconductor Core Team | FHCRC
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>



More information about the Bioconductor mailing list