-
Notifications
You must be signed in to change notification settings - Fork 133
SamClipIndelFraction
lindenb edited this page Nov 17, 2014
·
4 revisions
##Motivation
Extract clipping/indel fraction from BAM
##Compilation
See also Compilation.
$ ant samclipindelfraction
##Synopsis
$ java -jar dist/samclipindelfraction.jar [option] (stdin|file.bam)
##Options
Option | Description |
---|---|
-t (type) | one of: [leftclip, rightclip, allclip, insert, deletion] |
-h | get help (this screen) and exit. |
-v | print version and exit. |
-L (level) | log level. One of java.util.logging.Level . Optional. |
--doap | prints a DOAP+XML description of the program and exit |
##Source Code
Main code is: https://github.com/lindenb/jvarkit/blob/master/src/main/java/com/github/lindenb/jvarkit/tools/misc/SamClipIndelFraction.java
##Example
$ samtools view -h -F3844 my.bam | java -jar dist/samclipindelfraction.jar
##UNMAPPED_READS=0
##MAPPED_READS=3028359
##CLIPPED_READS=1182730
##CLIPPED_READS_5_PRIME=597757
##CLIPPED_READS_3_PRIME=617399
##UNCLIPPED_READS=1845629
##COUNT_BASES=338644685
#CLIP COUNT FRACTION_OF_MAPPED_READS
0 1845629 0.5
1 7 1.8963724562195327E-6
2 6756 0.0018302703306027376
3 695 1.8828269386751074E-4
4 794 2.1510281860547272E-4
5 819 2.2187557737768533E-4
6 471 1.275987752684857E-4
7 447 1.210969268471616E-4
(...)
plotting:
$ java -jar dist/samclipindelfraction.jar |\
grep -v "##" | cut -f1,2 | tr -d '#' > output.txt
then, in R:
T<-read.table('output.txt',header=TRUE)
plot(T[T$CLIP>0,])
##See also
##History
- 2014: Creation