Changes between Version 48 and Version 49 of SOPs/miningSAMBAM


Ignore:
Timestamp:
10/29/20 11:54:59 (4 years ago)
Author:
gbell
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SOPs/miningSAMBAM

    v48 v49  
    9898{{{
    9999# Method 2 (one chromosome at a time, for example, chr2)
    100 # From SAM
    101 awk -F"\t" '$3 == "chr2" {print $1}' mapped_reads.sam | sort -u | wc -l
    102 # From BAM
    103100samtools view mapped_reads.bam chr2 | cut -f 1 | sort -u | wc -l
    104101}}}
     
    118115
    119116{{{
    120 samtools view -h -f 2 mapped_unmapped.sam > mapped.properly_paired.sam
    121 }}}
    122 
     117samtools view -h -f 2 mapped_unmapped.bam | samtools view -bS > mapped.properly_paired.bam
     118}}}
     119
     120=== Extract spliced reads ===
     121
     122{{{
     123samtools view -h All_reads.bam | awk '$0 ~ /^@/ || $6 ~ /N/' | samtools view -bS > Spliced_reads.bam
     124}}}
    123125
    124126=== How many multiple/uniquely mapped reads are in a bam/sam file? ===