[BioC] Rgraphviz: how to read a \"dot\" file?
Kasper Daniel Hansen
khansen at jhsph.edu
Tue Oct 16 05:50:46 CEST 2012
Thanks Vince and Martin
Kasper
On Mon, Oct 15, 2012 at 9:47 PM, Martin Morgan <mtmorgan at fhcrc.org> wrote:
> On 10/15/2012 01:36 PM, Vincent Carey wrote:
>>
>> try agread()
>>
>> probably needs more doc
>
>
> I added some to the devel version of Rgraphviz, including:
>
> Read / write Ragraph objects
>
> Description:
>
> These functions will write an 'Ragraph' object to or from a file.
>
> Usage:
>
> agwrite(graph, filename)
> agread(filename, layoutType="dot", layout=TRUE)
>
> Arguments:
>
> graph: An object of class 'Ragraph'
>
> filename: The input or output filename
>
> layoutType: character(1) specifying the format of the input file. Must
> be one of 'graphvizCapabilities()$layoutTypes'.
>
> layout: logical(1) indicating whether 'graphLayout' is to be called
> on the result of file input.
>
> Details:
>
> These function are wrappers to agwrite() and agread() calls in
> Graphviz.
>
> Author(s):
>
> Jeff Gentry
>
> See Also:
>
> 'agopen', 'agread'
>
> Examples:
>
> V <- letters[1:10]
> M <- 1:4
> g1 <- randomGraph(V, M, .2)
> z <- agopen(g1, "foo", layout=FALSE) ## default layoutType 'dot'
> file <- tempfile()
> agwrite(z, file)
>
>
> ## supported input types
> graphvizCapabilities()$layoutTypes
> g2 <- agread(file, layout=TRUE)
> if (interactive())
> plot(g2)
>
>
>>
>> On Mon, Oct 15, 2012 at 4:16 PM, Sam [guest] <guest at bioconductor.org>
>> wrote:
>>
>>>
>>> The Rgraphviz package index says nothing about reading "dot" files.
>>> (it has "toFile" to write them but no fromFile).
>>> How do I create an Ragraph object?
>>> (either by reading a dot file or from a list of edges with weights and
>>> vertices with names and other attributes).
>>>
>>>
>>> -- output of sessionInfo():
>>>
>>>
>>> Thanks!
>>>
>>> --
>>> Sent via the guest posting facility at bioconductor.org.
>>>
>>> _______________________________________________
>>> Bioconductor mailing list
>>> Bioconductor at r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>>> Search the archives:
>>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>>
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>
>
> --
> Computational Biology / Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N.
> PO Box 19024 Seattle, WA 98109
>
> Location: Arnold Building M1 B861
> Phone: (206) 667-2793
>
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> 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