This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
samtools view -b Example_Condition1.sam -o Example_Condition1.bam | |
samtools view -b Example_Condition2.sam -o Example_Condition2.bam | |
## reverse | |
samtools view -h -f 16 Example_Condition1.bam -o Example_Condition1_rev.bam | |
## forward | |
samtools view -h -F 16 Example_Condition1.bam -o Example_Condition1_forw.bam | |
## reverse | |
samtools view -h -f 16 Example_Condition2.bam -o Example_Condition2_rev.bam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSIndex <- function(i, len, wise = 5) { | |
min <- i - wise | |
min <- ifelse(min < 1, 1, min) | |
max <- i + wise | |
max <- ifelse(max > len, len, max) | |
return(seq(min, max)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##~~~~~~~~~~~~~~~~~~~~~~~~~define class~~~~~~~~~~~~~~~~~~~~~~~~~ | |
## new class | |
setClass(Class = 'trick', | |
slots = c(id = 'character', time = 'matrix'), | |
validity = function(object) { | |
if (length(object@id) != nrow(object@time)) { | |
warns <- paste('length of id is', length(object@id), 'is not equal to row number of time', nrow(object@time)) | |
return(warns) | |
} else { | |
return(TRUE) |
NewerOlder