writeBedTrack {JunctionSeq} | R Documentation |
This function saves the JunctionSeq results in the form of a set of "bed" files designed for use with the UCSC genome browser.
writeExprBedTrack(file, jscs, trackLine, only.with.sig.gene = FALSE, only.sig = FALSE, only.testable = TRUE, plot.exons = TRUE, plot.junctions = TRUE, plot.novel.junctions = TRUE, group.RGB, use.score = FALSE, FDR.threshold = 0.05, count.digits = 1, includeGeneID = FALSE, includeLocusID = TRUE, includeGroupID = TRUE, output.format = c("BED", "GTF", "GFF3"), use.gzip = TRUE, verbose = TRUE) writeSigBedTrack(file, jscs, trackLine, only.sig = TRUE, only.testable = TRUE, plot.exons = TRUE, plot.junctions = TRUE, plot.novel.junctions = TRUE, sig.RGB = "255,0,0", nonsig.RGB = "0,0,0", use.score = TRUE, FDR.threshold = 0.05, pval.digits = 4, includeGeneID = FALSE, includeLocusID = TRUE, output.format = c("BED", "GTF", "GFF3"), use.gzip = TRUE, verbose = TRUE)
file |
Character string. File path for the output bed file. |
jscs |
A Alternatively, this can be created manually by |
trackLine |
The "track line" of the bed file. In other words, the first line of the file. By default JunctionSeq will attempt to automatically generate a reasonable track line. |
only.with.sig.gene |
Logical. If |
only.sig |
Logical. If |
only.testable |
Logical. If |
plot.exons |
Logical. If |
plot.junctions |
Logical. If |
plot.novel.junctions |
Logical. If |
sig.RGB |
Character string. The RGB color for significant genes. Must be in the format "r,g,b", with each value ranging from 0 to 255. |
nonsig.RGB |
Character string. The RGB color for non-significant loci. Must be in the format "r,g,b", with each value ranging from 0 to 255. |
group.RGB |
Character string. The RGB color used for each experimental group. Must be in the format "r,g,b", with each value ranging from 0 to 255. Must have a length equal to the number of experimental condition values. |
use.score |
Logical. If TRUE, score each locus based on the p-value. |
FDR.threshold |
Numeric. The FDR-adjusted p-value threshold to use to assign statistical significance. |
count.digits |
Numeric. The number of digits after the decimal point to include for the mean normalized counts. |
pval.digits |
Numeric. The number of digits after the decimal point to include for the p-values. |
includeGeneID |
Logical. If TRUE, include the ID of the gene in the "name" field of each line. |
includeLocusID |
Logical. If TRUE, include the ID of the locus in the "name" field of each line. |
includeGroupID |
Logical. If TRUE, include the ID of the group in the "name" field of each line. |
output.format |
Character string. The format to use. |
use.gzip |
Logical. Whether or not to gzip the bed file. |
verbose |
Logical. if TRUE, output debugging/progress information. |
This is a side-effecting function, and does not return a value.
data(exampleDataSet,package="JctSeqData");
writeExprBedTrack("test.exonCoverage.bed.gz", jscs,
plot.exons = TRUE, plot.junctions = FALSE)
## Not run:
##D ########################################
##D #Set up example data:
##D decoder.file <- system.file(
##D "extdata/annoFiles/decoder.bySample.txt",
##D package="JctSeqData");
##D decoder <- read.table(decoder.file,
##D header=TRUE,
##D stringsAsFactors=FALSE);
##D gff.file <- system.file(
##D "extdata/cts/withNovel.forJunctionSeq.gff.gz",
##D package="JctSeqData");
##D countFiles <- system.file(paste0("extdata/cts/",
##D decoder$sample.ID,
##D "/QC.spliceJunctionAndExonCounts.withNovel.forJunctionSeq.txt.gz"),
##D package="JctSeqData");
##D ######################
##D #Run example analysis:
##D jscs <- runJunctionSeqAnalyses(sample.files = countFiles,
##D sample.names = decoder$sample.ID,
##D condition=factor(decoder$group.ID),
##D flat.gff.file = gff.file,
##D analysis.type = "junctionsAndExons"
##D );
##D ########################################
##D
##D #Exon coverage:
##D writeExprBedTrack("test.exonCoverage.bed.gz", jscs,
##D plot.exons = TRUE, plot.junctions = FALSE)
##D #Junction coverage:
##D writeExprBedTrack("test.jctCoverage.bed.gz", jscs,
##D plot.exons = FALSE, plot.junctions = TRUE)
##D #Both Exon and Junction coverage:
##D writeExprBedTrack("test.featureCoverage.bed.gz", jscs)
##D
##D #p-values of significant features:
##D writeSigBedTrack("test.pvals.bed.gz", jscs)
##D
## End(Not run)