1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
\name{network.plot}
\Rdversion{1.1}
\alias{network.plot}
\title{
Creates network structure of top elements
}
\description{
Given a top_pairs object (result of the \code{\link{top_pairs_analysis}} function), creates a network to visualize the elements involved in the top scoring pairs and their links
}
\usage{
network.plot(top_pairs, filepathroot)
}
\arguments{
\item{top_pairs}{
An object of class 'top_pairs' created by the \code{\link{top_pairs_analysis}} function
}
\item{filepathroot}{
The root of the full path name for the output file. If NULL, a "NETWORK.pdf" file will be created in tempdir(). If not NULL, the filepathroot will have the "_NETWORK.pdf" extension.
}
}
\value{
A network representing links between elements in the top scoring pairs
}
\author{
Antoine GARNIER
}
\examples{
#File path for output file
out <- tempdir()
file <- file.path(out,"test_omes")
#Importing MSA file
msf <- system.file("msa/toy_align.msf", package = "Bios2cor")
align <- import.msf(msf)
#Creating OMES correlation object for positions with gap ratio < 0.2
omes <- omes(align, gap_ratio= 0.2)
#Selecting a correlation matrix
omes <-omes$Zscore
#Analyzing pairs with top scores and creating 'top_pairs' object
top_pairs <- top_pairs_analysis(omes, top = 25, file)
#Plotting the network structure of top pairs in pdf file
network.plot(top_pairs, file)
}
|