Last data update: 2014.03.03
|
R: Common sequences Venn diagram
commonSeqsVenn | R Documentation |
Common sequences Venn diagram
Description
Creates a Venn diagram comparing the number of common sequences in two or
three samples.
Usage
commonSeqsVenn(samples, productive.seqs)
Arguments
samples |
A character vector of two or three names of samples in
productive.seqs to compare.
|
productive.seqs |
A list of productive amino acid sequences generated
by the LymphoSeq function productiveSeq.
|
Value
Returns a a Venn diagram of the number of common sequences between
two or three samples.
See Also
commonSeqs
Examples
file.path <- system.file("extdata", "TCRB_sequencing", package = "LymphoSeq")
file.list <- readImmunoSeq(path = file.path)
productive.aa <- productiveSeq(file.list = file.list, aggregate = "aminoAcid")
# Plot a triple Venn diagram
commonSeqsVenn(samples = c("TCRB_Day0_Unsorted",
"TCRB_Day32_Unsorted", "TCRB_Day83_Unsorted"),
productive.seqs = productive.aa)
# Plot a double Venn diagram
commonSeqsVenn(samples = c("TCRB_Day0_Unsorted",
"TCRB_Day32_Unsorted"), productive.seqs = productive.aa)
# Save Venn diagram as a .png file to working directory
png(filename = "Venn diagram.png", res = 300, units = "in", height = 5, width = 5)
commonSeqsVenn(samples = c("TCRB_Day0_Unsorted", "TCRB_Day32_Unsorted"),
productive.seqs = productive.aa)
dev.off()
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(LymphoSeq)
Loading required package: LymphoSeqDB
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/LymphoSeq/commonSeqsVenn.Rd_%03d_medium.png", width=480, height=480)
> ### Name: commonSeqsVenn
> ### Title: Common sequences Venn diagram
> ### Aliases: commonSeqsVenn
>
> ### ** Examples
>
> file.path <- system.file("extdata", "TCRB_sequencing", package = "LymphoSeq")
>
> file.list <- readImmunoSeq(path = file.path)
| | | 0% | |====== | 9% | |============= | 18% | |=================== | 27% | |========================= | 36% | |================================ | 45% | |====================================== | 55% | |============================================= | 64% | |=================================================== | 73% | |========================================================= | 82% | |================================================================ | 91% | |======================================================================| 100%
>
> productive.aa <- productiveSeq(file.list = file.list, aggregate = "aminoAcid")
| | | 0% | |====== | 9% | |============= | 18% | |=================== | 27% | |========================= | 36% | |================================ | 45% | |====================================== | 55% | |============================================= | 64% | |=================================================== | 73% | |========================================================= | 82% | |================================================================ | 91% | |======================================================================| 100%
>
> # Plot a triple Venn diagram
> commonSeqsVenn(samples = c("TCRB_Day0_Unsorted",
+ "TCRB_Day32_Unsorted", "TCRB_Day83_Unsorted"),
+ productive.seqs = productive.aa)
>
> # Plot a double Venn diagram
> commonSeqsVenn(samples = c("TCRB_Day0_Unsorted",
+ "TCRB_Day32_Unsorted"), productive.seqs = productive.aa)
>
> # Save Venn diagram as a .png file to working directory
> #png(filename = "Venn diagram.png", res = 300, units = "in", height = 5, width = 5)
>
> commonSeqsVenn(samples = c("TCRB_Day0_Unsorted", "TCRB_Day32_Unsorted"),
+ productive.seqs = productive.aa)
>
> #dev.off()
>
>
>
>
>
> dev.off()
null device
1
>
|