The PR for samtools (visualize CNVs in the #terminal ) was merged today ! #samtools #cnv #sv #structuralvariant #ascii https://github.com/samtools/samtools/pull/1910
#terminal #samtools #cnv #SV #structuralvariant #ascii
Split a #BAM file produced by #CellRanger into one file per #singlecell barcode, using #samtools and #awk:
samtools view in.bam | awk '/CB:Z:/{f=substr($0,match($0,/CB:Z:[ACGT]{16}/)+5,16)".txt"}{print>>f}'
#awk #samtools #SingleCell #cellranger #Bam
plot depth of #coverage in the #terminal using #samtools #depth and gnuplot:
```
$ samtools depth -a -r "chr1:234-456" in.bam | cut -f 2,3 | gnuplot -e 'set terminal dumb size 120,28; plot "-" smooth csplines with lines notitle'
```
#coverage #terminal #samtools #depth #linux #bioinformatics