Commit 1ec3d18a authored by Sander Bollen's avatar Sander Bollen
Browse files

mapping metrics

parent 0d366453
......@@ -251,3 +251,39 @@ rule genotype_gather:
"-assumeSorted"
## bam metrics
rule mapped_num:
input:
bam=out_path("{sample}/bams/{sample}.sorted.bam")
output:
num=out_path("{sample}/bams/{sample}.mapped.num")
conda: "envs/samtools.yml"
shell: "samtools view -F 4 {input.bam} | wc -l > {output.num}"
rule mapped_basenum:
input:
bam=out_path("{sample}/bams/{sample}.sorted.bam")
output:
num=out_path("{sample}/bams/{sample}.mapped.basenum")
conda: "envs/samtools.yml"
shell: "samtools view -F 4 {input.bam} | wc -c > {output.num}"
rule unique_num:
input:
bam=out_path("{sample}/bams/{sample}.markdup.bam")
output:
num=out_path("{sample}/bams/{sample}.unique.num")
conda: "envs/samtools.yml"
shell: "samtools view -F 4 -F 1024 {input.bam} | wc -l {output.num}"
rule usable_basenum:
input:
bam=out_path("{sample}/bams/{sample}.markdup.bam")
output:
num=out_path("{sample}/bams/{sample}.usable.basenum")
conda: "envs/samtools.yml"
shell: "samtools view -F 4 -F 1024 {input.bam} | cut -f10 | wc -c > {output.num}"
name: hutspot-samtools
channels:
- bioconda
- conda-forge
- defaults
- r
dependencies:
- samtools=1.6=0
- bzip2=1.0.6=1
- ca-certificates=2017.11.5=0
- curl=7.54.1=0
- krb5=1.14.2=0
- libssh2=1.8.0=1
- openssl=1.0.2l=0
- xz=5.2.3=0
- zlib=1.2.8=3
- libgcc=5.2.0=0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment