plotATCGforFAfile: Plot single nucleotide profile

plotATCGforFAfileR Documentation

Plot single nucleotide profile

Description

plotATCGforFAfile plots single nucleotide profile for given fasta files.

Usage

plotATCGforFAfile(
  faFiles,
  ofreq = FALSE,
  opdf = TRUE,
  refPos = NULL,
  start = NA,
  end = NA,
  filepre = "",
  mergePlots = FALSE
)

Arguments

faFiles

fasta file names, e.g., c(xx.fa, yy.fa)

ofreq

FALSE/TRUE. If true, output xx.freq, yy.freq, [pos, A C G T]

opdf

TRUE/FALSE. If true, output xx.pdf, yy.pdf

refPos

the position of the poly(A) site. Value can be NULL or a number. E.g., refPos=300, then the relative position to the PAC (pos=0) is pos-301.

start

to narrow the plot region from start~end

end

to narrow the plot region from start~end

filepre

prefix of output file, if mergePlots=T, then output file=<filepre>.pdf; otherwise, each file is <file>.<filepre>.pdf

mergePlots

if TRUE, then combine all plots with facet into one plot. If opdf=TRUE, then filepre should be provided. In the merged PDF file, the title of each plot is like <fafile> #seqNumber. Long file name will be automatically shortened.

Value

NULL. Plot figures to PDF file or screen.

See Also

Other APA signal functions: annotateByPAS(), faFromPACds(), getVarGrams(), kcount(), plotSeqLogo()

Examples

data(PACds)
library("BSgenome.Oryza.ENSEMBL.IRGSP1")
bsgenome <- BSgenome.Oryza.ENSEMBL.IRGSP1
faFiles=faFromPACds(PACds, bsgenome, what='updn', fapre='updn', up=-100, dn=100, byGrp='ftr')
faFiles=c("updn.3UTR.fa", "updn.Ext_3UTR.fa", "updn.intergenic.fa", "updn.intron.fa" )
## plot single nucleotide profile for a fa file
plotATCGforFAfile (faFiles="updn.3UTR.fa", ofreq=TRUE, opdf=TRUE, refPos=301)
## plot multiple fa files
fafiles=faFromPACds(PACds, bsgenome, what='updn', fapre='400nt',
       up=-300, dn=100, byGrp='ftr', chrCheck=FALSE)
plotATCGforFAfile (faFiles=fafiles, ofreq=TRUE, opdf=TRUE, refPos=301)
## plot multiple fa files into one PDF
fafiles=faFromPACds(PACds, bsgenome, what='updn', fapre='400nt',
       up=-300, dn=100, byGrp='ftr', chrCheck=FALSE)
plotATCGforFAfile (faFiles=fafiles, ofreq=TRUE, opdf=TRUE,
      refPos=301, mergePlots=TRUE, filepre='allplots')

BMILAB/movAPA documentation built on Jan. 3, 2024, 11:09 p.m.