Skip to content

Commit

Permalink
minor modification in mapping_qc
Browse files Browse the repository at this point in the history
  • Loading branch information
wbaopaul committed Mar 4, 2022
1 parent 2545e8e commit b6b5566
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?)

- <u>Run scATAC-pro sequentially (specifyi PEAK_CALLER = MACS2 and CELL_CALLER = FILTER or other values in the configure_user.txt file) </u>
- <u>Run scATAC-pro sequentially (specify PEAK_CALLER = MACS2 and CELL_CALLER = FILTER or other values in the configure_user.txt file) </u>

```
$ scATAC-pro -s demplx_fastq
Expand Down
2 changes: 1 addition & 1 deletion scATAC-pro.wiki
Submodule scATAC-pro.wiki updated from f0da62 to f8cac5
9 changes: 6 additions & 3 deletions scripts/cell_mapping_qc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
9 changes: 6 additions & 3 deletions scripts/mapping_qc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit b6b5566

Please sign in to comment.