From bf67cde8550f0bafec1e57a59aa8424ee1e28b0b Mon Sep 17 00:00:00 2001 From: wbaopaul Date: Thu, 10 Mar 2022 17:15:48 -0500 Subject: [PATCH 1/6] start new dev branch --- scripts/mapping.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mapping.sh b/scripts/mapping.sh index 7f94832..cd1f38c 100755 --- a/scripts/mapping.sh +++ b/scripts/mapping.sh @@ -93,7 +93,7 @@ ${R_PATH}/Rscript --vanilla ${curr_dir}/src/sort_frags.R ${qc_dir}/${OUTPUT_PREF ## index fragment file #sort -k1,1 -k2,2n -T ${mapRes_dir}/tmp/ ${qc_dir}/${OUTPUT_PREFIX}.fragments.tsv > ${qc_dir}/${OUTPUT_PREFIX}.fragments.sorted.tsv #mv ${qc_dir}/${OUTPUT_PREFIX}.fragments.sorted.tsv ${qc_dir}/${OUTPUT_PREFIX}.fragments.tsv -${TABIX_PATH}/bgzip ${qc_dir}/${OUTPUT_PREFIX}.fragments.tsv -${TABIX_PATH}/tabix -p bed ${qc_dir}/${OUTPUT_PREFIX}.fragments.tsv.gz +${TABIX_PATH}/bgzip -f ${qc_dir}/${OUTPUT_PREFIX}.fragments.tsv +${TABIX_PATH}/tabix -f -p bed ${qc_dir}/${OUTPUT_PREFIX}.fragments.tsv.gz From fb3f10f9c78dd8037df3cb70c53781f30d546840 Mon Sep 17 00:00:00 2001 From: wbaopaul Date: Fri, 11 Mar 2022 13:12:48 -0500 Subject: [PATCH 2/6] add version name in the report --- README.md | 8 ++++---- scATAC-pro | 2 +- scripts/process_with_bam.sh | 2 +- scripts/report.sh | 5 ++--- scripts/src/render2report.R | 3 ++- scripts/src/scATAC-pro_report.Rmd | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index f6efe7a..a7dba89 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Installation ------------ - Note: It is not necessary to install scATAC-pro from scratch. You can use the docker or singularity version if your system support (see [Run scATAC-pro through docker or singularity](#run-scATAC-pro-through-docker-or-singularity) ) -- Run the following command in your terminal, scATAC-pro will be installed in YOUR\_INSTALL\_PATH/scATAC-pro\_1.4.3 +- Run the following command in your terminal, scATAC-pro will be installed in YOUR\_INSTALL\_PATH/scATAC-pro\_1.4.4 @@ -49,9 +49,9 @@ Installation Updates ------------ - Now provide [scATAC-pro tutorial in R](https://scatacpro-in-r.netlify.app/index.html) for access QC metrics and perform downstream analysis -- Current version: 1.4.3 +- Current version: 1.4.4 - Highlighted updates - * **New module *reprocess_cellranger_output* added, to reprocess 10x scATAC-seq data (including atac in 10x multiome assay) originally processed by cellranger, taking cellranger processed .bam and .fragments.tsv.gz files as input (v1.4.3)** + * **New module *reprocess_cellranger_output* added, to reprocess 10x scATAC-seq data (including atac in 10x multiome assay) originally processed by cellranger, taking cellranger processed .bam and .fragments.tsv.gz files as input (v1.4.4)** * More friendly to single-end sequencing data (v1.4.2) * New module *labelTransfer* added, to do label trasfer (for cell annotation) from cell annotation of scRNA-seq data. First construct a gene by cell activity matrix, then use *FindTransferAnchors* and *TransferData* function from Seurat R package to predicted cell type annotation from the cell annotaiton in scRNA-seq data (v1.4.0) * New module *rmDoublets* added,to remove potential doublets using [DoubletFinder](https://github.com/chris-mcginnis-ucsf/DoubletFinder) algorithm (v1.3.1) @@ -302,7 +302,7 @@ See [here](https://scatacpro-in-r.netlify.app/note_module) or in your terminal: usage : scATAC-pro -s STEP -i INPUT -c CONFIG [-o] [-h] [-v] Use option -h|--help for more information - scATAC-pro 1.4.3 + scATAC-pro 1.4.4 --------------- OPTIONS diff --git a/scATAC-pro b/scATAC-pro index 789d8a7..3141f8b 100755 --- a/scATAC-pro +++ b/scATAC-pro @@ -9,7 +9,7 @@ ######################### SOFT="scATAC-pro" -VERSION="1.4.3" +VERSION="1.4.4" function usage { echo -e "usage : $SOFT -s STEP -i INPUT -c CONFIG [-o] [-h] [-v] [-b]" diff --git a/scripts/process_with_bam.sh b/scripts/process_with_bam.sh index 2bbc9ab..7ae9b61 100755 --- a/scripts/process_with_bam.sh +++ b/scripts/process_with_bam.sh @@ -29,7 +29,7 @@ ${R_PATH}/Rscript --vanilla ${curr_dir}/src/sort_frags.R ${qc_dir}/${OUTPUT_PREF #sort -k1,1 -k2,2n -T ${mapRes_dir}/tmp/ ${qc_dir}/${OUTPUT_PREFIX}.fragments.tsv > ${qc_dir}/${OUTPUT_PREFIX}.fragments.sorted.tsv #mv ${qc_dir}/${OUTPUT_PREFIX}.fragments.sorted.tsv ${qc_dir}/${OUTPUT_PREFIX}.fragments.tsv ${TABIX_PATH}/bgzip -f ${qc_dir}/${OUTPUT_PREFIX}.fragments.tsv -${TABIX_PATH}/tabix -p bed ${qc_dir}/${OUTPUT_PREFIX}.fragments.tsv.gz +${TABIX_PATH}/tabix -f -p bed ${qc_dir}/${OUTPUT_PREFIX}.fragments.tsv.gz ## 2.call peak diff --git a/scripts/report.sh b/scripts/report.sh index c9e7b04..ee9e71a 100755 --- a/scripts/report.sh +++ b/scripts/report.sh @@ -23,9 +23,8 @@ configure_file=`basename ${2}` abs_configure_dir=`cd ${configure_dir}; pwd` abs_configure_file=${abs_configure_dir}/${configure_file} -#${R_PATH}/Rscript --vanilla ${curr_dir}/src/render2report.R \ -# ${abs_report_dir}/scATAC-pro_report_${OUTPUT_PREFIX}.html $abs_out_dir ${work_dir}/${2} +scatacpro_version=`scATAC-pro --version | cut -d " " -f3` ${R_PATH}/Rscript --vanilla ${curr_dir}/src/render2report.R \ - ${abs_report_dir}/scATAC-pro_report_${OUTPUT_PREFIX}.html $abs_out_dir $abs_configure_file + ${abs_report_dir}/scATAC-pro_report_${OUTPUT_PREFIX}.html $abs_out_dir $abs_configure_file $scatacpro_version echo "Report generation Done!" diff --git a/scripts/src/render2report.R b/scripts/src/render2report.R index 4307bca..fb3d05e 100644 --- a/scripts/src/render2report.R +++ b/scripts/src/render2report.R @@ -4,10 +4,11 @@ args = commandArgs(T) output_file = args[1] result_dir = args[2] configure_file = args[3] +scatacpro_version = args[4] argv <- commandArgs(trailingOnly = FALSE) curr_dir <- dirname(substring(argv[grep("--file=", argv)], 8)) out_dir = dirname(output_file) rmarkdown::render(paste0(curr_dir, "/scATAC-pro_report.Rmd"), output_file=output_file, intermediates_dir = out_dir, - params = list(output_dir = result_dir, configure_user = configure_file)) + params = list(set_title = scatacpro_version, output_dir = result_dir, configure_user = configure_file)) diff --git a/scripts/src/scATAC-pro_report.Rmd b/scripts/src/scATAC-pro_report.Rmd index b8ee309..68426a7 100644 --- a/scripts/src/scATAC-pro_report.Rmd +++ b/scripts/src/scATAC-pro_report.Rmd @@ -1,14 +1,14 @@ --- -title: scATAC-pro Report output: flexdashboard::flex_dashboard: vertical_layout: fill social: menu theme: united params: + set_title: scATAC-pro Report output_dir: /mnt/isilon/tan_lab/yuw1/run_scATAC-pro/PBMC10k/output configure_user: /mnt/isilon/tan_lab/yuw1/run_scATAC-pro/PBMC10k/configure_user.txt - +title: "scATAC-pro `r params$set_title`" ---