Description Usage Arguments Value Author(s) See Also Examples
View source: R/norm2bedgraph.R
Function converts annotation from transcript to genomic coordinates and creates two-track bedgraph file (one track for each strand)
1 2 3 | norm2bedgraph(norm_GR, txDb, bed_file, norm_method, genome_build,
bedgraph_out_file = "out_file", track_name = "Track_name",
track_description = "Track_description")
|
norm_GR |
norm_GR GRanges with data to be exported, required |
txDb |
TranscriptDb object with transcript definitions. Names must match those in norm_df |
bed_file |
character containing file path to BED file with transcript definitions. Supply txDb XOR bedfile |
norm_method |
character specifying which normalized column should be processed into bedgraph. If not provided, the first column matching dtcr, slograt or swinsor is transformed. |
genome_build |
character specifying which UCSC genome build should data be displayed in, e.g. "mm9" |
bedgraph_out_file |
character specifying prefix of output file. Generated file name is: prefix.bedgraph; if file with such a name already exists new tracks will be appended. |
track_name |
character specifying track name |
track_description |
character specifying track description |
Function writes bedgraph file.
Lukasz Jan Kielpinski, Nikos Sidiropoulos
bedgraph2norm
, norm_df2GR
,
dtcr
, slograt
, swinsor
,
compdata
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | dummy_euc_GR_control <- GRanges(seqnames="DummyRNA",
IRanges(start=round(runif(100)*100),
width=round(runif(100)*100+1)), strand="+",
EUC=round(runif(100)*100))
dummy_euc_GR_treated <- GRanges(seqnames="DummyRNA",
IRanges(start=round(runif(100)*100),
width=round(runif(100)*100+1)), strand="+",
EUC=round(runif(100)*100))
dummy_comp_GR_control <- comp(dummy_euc_GR_control)
dummy_comp_GR_treated <- comp(dummy_euc_GR_treated)
dummy_norm <- dtcr(control_GR=dummy_comp_GR_control,
treated_GR=dummy_comp_GR_treated)
write(strwrap("chr1\t134212702\t134229870\tDummyRNA\t0\t+
\t134212806\t134228958\t0\t8\t347,121,24,152,66,120,133,1973,
\t0,8827,10080,11571,12005,13832,14433,15195,", width = 300),
file="dummy.bed")
norm2bedgraph(norm_GR = dummy_norm, bed_file = "dummy.bed")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.