Build bigwigs

CLIP_bw2(
  sort_bam,
  res_dir = dirname(sort_bam),
  normalized = TRUE,
  stranded = FALSE,
  verbose = FALSE
)

Arguments

sort_bam

path to sorted BAM file.

res_dir

result directory, default is directory where BAM file is located, to specify other/create new directory, enter path as character string.

normalized

normalized to total reads.

stranded

Whether to make separate bigwigs for each strand, TRUE or FALSE (default).

verbose

print messages, TRUE or FALSE (default).

Value

bigwig.

Examples

testFasta <- system.file("extdata/hg19Small.fa",package="CLIPflexR")
myIndex <-suppressWarnings(bowtie2_index(testFasta, overwrite = TRUE))
testFQ <- system.file("extdata/Fox3_Std_small.fq.gz",package="CLIPflexR")
FqFile <- decompress(testFQ,overwrite = TRUE)
FqFile_FF <- ctk_fastqFilter(FqFile,qsFilter = "mean:0-29:20",verbose=TRUE)
#> fastq_filter.pl command is /Users/runner/Library/r-miniconda/envs/CLIPflexR_0.1.20/bin/ctk/fastq_filter.pl
#> fastq_filter.pl arguments are /Users/runner/Library/r-miniconda/envs/CLIPflexR_0.1.20/bin/ctk/fastq_filter.pl  -if sanger  -of fastq  -f mean:0-29:20  /Users/runner/work/_temp/Library/CLIPflexR/extdata/Fox3_Std_small.fq  /Users/runner/work/_temp/Library/CLIPflexR/extdata/FF_Fox3_Std_small.fq 
FqFile_clipped <- fastx_clipper(FqFile_FF,length=20)
FqFile_QF <- fastq_quality_trimmer(FqFile_clipped)
FqFile_Col <- ctk_fastq2collapse(FqFile_QF,verbose = TRUE)
#> fastq_filter.pl command is /Users/runner/Library/r-miniconda/envs/CLIPflexR_0.1.20/bin/ctk/fastq2collapse.pl
#> fastq_filter.pl arguments are /Users/runner/Library/r-miniconda/envs/CLIPflexR_0.1.20/bin/ctk/fastq2collapse.pl  /Users/runner/work/_temp/Library/CLIPflexR/extdata/QT_FF_Fox3_Std_small_clip.fq  /Users/runner/work/_temp/Library/CLIPflexR/extdata/Collapsed_QT_FF_Fox3_Std_small_clip.fq 
FqFile_ColStrip <- ctk_stripBarcode(FqFile_Col,linkerlength=5, inputFormat="fastq") 
##map reads to genome
mapped <- suppressWarnings(bowtie_align(FqFile_ColStrip,myIndex, 
mode="genome_map", inputFormat="fastq"))
wig <- CLIP_bw2(mapped)