Changes between Version 38 and Version 39 of SOPs/miningSAMBAM


Ignore:
Timestamp:
09/12/17 14:17:03 (7 years ago)
Author:
gbell
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SOPs/miningSAMBAM

    v38 v39  
    126126}}}
    127127
    128 === Get only uniquely mapped reads from sam/bam files generated by bowtie2 ===
     128=== Get only uniquely mapped reads from sam/bam files ===
    129129
    130130{{{
    131 # For sam files:
    132 grep -v "XS:i" | grep "AS:i" foo.sam >| foo_uniquely_mapped.sam
    133 # For bam files:
    134 samtools view -h  foo.bam |grep -E -v "XS:i"|grep -E "@|AS:i" |samtools view -b - >| foo_uniquely_mapped.bam
     131# For sam/bam files generated by bowtie2:
     132grep -v "XS:i" | grep "AS:i" All.sam >| Uniquely_mapped.sam
     133samtools view -h All.bam | grep -E -v "XS:i" | grep -E "@|AS:i" | samtools view -b - >| Uniquely_mapped.bam
     134# For any bam files
     135samtools view -b -q 10 All_reads.bam > Uniquely_mapped.bam
    135136}}}
    136137