Usage Arguments See Also Examples
1 2 | Count_SRRs(SRRs, bam_dir = "./", reference_annotation, save_title,
paired = F, Mode = "Union", Ignore.strand = T, Inter.feature = F)
|
SRRs |
The bam file names (without .bam). |
reference_annotation |
A |
Mode, Inter.feature, Ignore.strand |
Default settings are "Union",FALSE, and TRUE resectively; see Generally, set Ignore.strand = TRUE if you are not using strand specific library (other wise you usually lose half of your data). Set Inter.feature = T if you want to deal with overlapping features. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Count_SRRs(SRR_RUN_human_SE,"./",Annotation_gr,F,"Example_human_SE")
###An example to handel a long list of bam files with either single end or paired end sequencing library
library(RbashGEO)
Annot_GR <- GenomicRanges::reduce( readRDS("SVM_RMBase.rds") ,min.gapwidth=0L)
Coldata_df <- read.csv("Coldata_target_human.csv")
Count_seperately <- function(SRR_RUN,BAM_dir,Annot_gr,title){
if(sum(!paste0(SRR_RUN,".bam") %in% grep(".bam", list.files(BAM_dir) , value = T)) > 0) {stop("Incomplete bam files, please check again.")}
SRR_RUN_SE <- as.character( SRR_RUN )[Coldata_df$Lib == "Single"]
SRR_RUN_PE <- as.character( SRR_RUN )[Coldata_df$Lib == "Paired"]
Count_SRRs(SRR_RUN_SE,BAM_dir,Annot_gr,paste0(title,"_SE"),F)
Count_SRRs(SRR_RUN_PE,BAM_dir,Annot_gr,paste0(title,"_PE"),T)
}
Count_seperately(Coldata_df$SRR_RUN,"/home/zhen/TREW_cons_bams",Annot_GR,"SVM_RMBase")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.