From b6b55663d90609fd1657090a62d808795c73eca5 Mon Sep 17 00:00:00 2001 From: wbaopaul Date: Fri, 4 Mar 2022 09:59:15 -0500 Subject: [PATCH] minor modification in mapping_qc --- README.md | 2 +- scATAC-pro.wiki | 2 +- scripts/cell_mapping_qc.sh | 9 ++++++--- scripts/mapping_qc.sh | 9 ++++++--- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e0b9e26..f6efe7a 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ Step by step guide to running scATAC-pro - **IMPORTANT**: you can run scATAC-pro sequentially. The input of a later analysis module is the output of the previous analysis modules. The following tutorial uses fastq files downloaded from [PBMC10k 10X Genomics](https://support.10xgenomics.com/single-cell-atac/datasets/1.1.0/atac_v1_pbmc_10k?) -- Run scATAC-pro sequentially (specifyi PEAK_CALLER = MACS2 and CELL_CALLER = FILTER or other values in the configure_user.txt file) +- Run scATAC-pro sequentially (specify PEAK_CALLER = MACS2 and CELL_CALLER = FILTER or other values in the configure_user.txt file) ``` $ scATAC-pro -s demplx_fastq diff --git a/scATAC-pro.wiki b/scATAC-pro.wiki index f0da625..f8cac58 160000 --- a/scATAC-pro.wiki +++ b/scATAC-pro.wiki @@ -1 +1 @@ -Subproject commit f0da625acd87658f1d4520f2a78b74f2ad59f38c +Subproject commit f8cac58c44a6266ce8cd3b2a615fcb9c646c1aad diff --git a/scripts/cell_mapping_qc.sh b/scripts/cell_mapping_qc.sh index f2c78be..988a226 100755 --- a/scripts/cell_mapping_qc.sh +++ b/scripts/cell_mapping_qc.sh @@ -46,9 +46,12 @@ tmp_bam_file=${output_dir}/tmp.bam if [[ $MAPPING_METHOD == bwa ]]; then - ${SAMTOOLS_PATH}/samtools view -@ $ncore -q 5 -f $flag0 -b ${input_pre}.bam > $tmp_bam_file - total_uniq_mapped=$( ${SAMTOOLS_PATH}/samtools view -c $tmp_bam_file ) ## number of unique mapped reads - rm $tmp_bam_file + #${SAMTOOLS_PATH}/samtools view -@ $ncore -q 5 -f $flag0 -b ${input_pre}.bam > $tmp_bam_file + #total_uniq_mapped=$( ${SAMTOOLS_PATH}/samtools view -c $tmp_bam_file ) ## number of unique mapped reads + #rm $tmp_bam_file + + ## alternatively + total_uniq_mapped=$( ${SAMTOOLS_PATH}/samtools view -q 1 -@ $ncore -f $flag0 ${input_pre}.bam | grep -v XA: | wc -l ) else ${SAMTOOLS_PATH}/samtools view -@ $ncore -q 5 -f $flag0 ${input_pre}.bam > $tmp_sam_file total_uniq_mapped=$( grep -E "@|NM:" $tmp_sam_file | grep -v "XS:" | wc -l ) diff --git a/scripts/mapping_qc.sh b/scripts/mapping_qc.sh index 1823bd2..1a3b08c 100755 --- a/scripts/mapping_qc.sh +++ b/scripts/mapping_qc.sh @@ -41,9 +41,12 @@ tmp_sam_file=${output_dir}/tmp.sam tmp_bam_file=${output_dir}/tmp.bam if [ $MAPPING_METHOD == 'bwa' ]; then - ${SAMTOOLS_PATH}/samtools view -@ $ncore -q 5 -f $flag0 -b ${input_pre}.positionsort.bam > $tmp_bam_file - total_uniq_mapped=$( ${SAMTOOLS_PATH}/samtools view -c $tmp_bam_file ) ## number of unique mapped reads - rm $tmp_bam_file + #${SAMTOOLS_PATH}/samtools view -@ $ncore -q 5 -f $flag0 -b ${input_pre}.positionsort.bam > $tmp_bam_file + #total_uniq_mapped=$( ${SAMTOOLS_PATH}/samtools view -c $tmp_bam_file ) ## number of unique mapped reads + #rm $tmp_bam_file + + ## alternatively + total_uniq_mapped=$( ${SAMTOOLS_PATH}/samtools view -q 1 -@ $ncore -f $flag0 ${input_pre}.positionsort.bam | grep -v XA: | wc -l ) else ${SAMTOOLS_PATH}/samtools view -@ $ncore -q 5 -f $flag0 ${input_pre}.positionsort.bam > $tmp_sam_file total_uniq_mapped=$( grep -E "@|NM:" $tmp_sam_file | grep -v "XS:" | wc -l )