Skip to content

Commit

Permalink
V1.3.1 released
Browse files Browse the repository at this point in the history
  • Loading branch information
wbaopaul committed May 21, 2021
1 parent f0abcef commit 0a77b85
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 40 deletions.
24 changes: 0 additions & 24 deletions scripts/addQC2seurat.sh

This file was deleted.

1 change: 1 addition & 0 deletions scripts/downstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ read_conf $3

frag_file=${OUTPUT_DIR}/summary/${OUTPUT_PREFIX}.fragments.tsv.gz


## clustering
${curr_dir}/clustering.sh $input_mtx $2 $3

Expand Down
5 changes: 4 additions & 1 deletion scripts/integrate_peak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ do
frag0_file=$(find $frag0_dir -name "*fragments*" | grep -v "\.len")
mat0_dir=${mat0_dir}/${PEAK_CALLER}/${CELL_CALLER}
#bc0_file=$(find ${mat0_dir} -name "*barcodes.txt")
bc0_file=${mat0_dir}/barcodes.txt
bc0_file=${mat0_dir}/barcodes_doubletsRemoved.txt
if [ ! -e "$bc0_file" ]; then
bc0_file=${mat0_dir}/barcodes.txt
fi
bash ${curr_dir}/reConstMtx.sh ${feature_file},${frag0_file},${bc0_file} $2 $3
mtx_files=${mtx_files},${mat0_dir}/reConstruct_matrix/matrix.mtx
done
Expand Down
15 changes: 11 additions & 4 deletions scripts/process.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,19 @@ echo "call cell ..."
mat_file=${OUTPUT_DIR}/raw_matrix/${PEAK_CALLER}/matrix.mtx
${curr_dir}/call_cell.sh $mat_file $2 $3

## 8. mapping qc for cell barcodes

## 8. remove doublets
filtered_mtx_file=${OUTPUT_DIR}/filtered_matrix/${PEAK_CALLER}/${CELL_CALLER}/matrix.rds
${curr_dir}/rmDoublets.sh ${filtered_mtx_file},0.03 $2 $3

## 9. mapping qc for cell barcodes
map_dir=${OUTPUT_DIR}/mapping_result
input_bam=${map_dir}/${OUTPUT_PREFIX}.positionsort.bam
input_bc=${OUTPUT_DIR}/filtered_matrix/${PEAK_CALLER}/${CELL_CALLER}/barcodes.txt
input_bc=${OUTPUT_DIR}/filtered_matrix/${PEAK_CALLER}/${CELL_CALLER}/barcodes_doubletsRemoved.txt
${curr_dir}/get_bam4Cells.sh ${input_bam},${input_bc} $2 $3

## report preprocessing QC
## 10.report preprocessing QC
echo "generating report ..."
${curr_dir}/report.sh $OUTPUT_DIR/summary $2 $3
${curr_dir}/report.sh ${OUTPUT_DIR}/summary $2 $3


12 changes: 8 additions & 4 deletions scripts/process_no_dex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,17 @@ echo "call cell ..."
mat_file=${OUTPUT_DIR}/raw_matrix/${PEAK_CALLER}/matrix.mtx
${curr_dir}/call_cell.sh $mat_file $2 $3

## 8. mapping qc for cell barcodes
## 8. remove doublets
filtered_mtx_file=${OUTPUT_DIR}/filtered_matrix/${PEAK_CALLER}/${CELL_CALLER}/matrix.rds
${curr_dir}/rmDoublets.sh ${filtered_mtx_file},0.03 $2 $3

## 9. mapping qc for cell barcodes
map_dir=${OUTPUT_DIR}/mapping_result
input_bam=${map_dir}/${OUTPUT_PREFIX}.positionsort.bam
input_bc=${OUTPUT_DIR}/filtered_matrix/${PEAK_CALLER}/${CELL_CALLER}/barcodes.txt
input_bc=${OUTPUT_DIR}/filtered_matrix/${PEAK_CALLER}/${CELL_CALLER}/barcodes_doubletsRemoved.txt
${curr_dir}/get_bam4Cells.sh ${input_bam},${input_bc} $2 $3

## report preprocessing QC
## 10.report preprocessing QC
echo "generating report ..."
${curr_dir}/report.sh $OUTPUT_DIR/summary $2 $3
${curr_dir}/report.sh ${OUTPUT_DIR}/summary $2 $3

14 changes: 9 additions & 5 deletions scripts/process_with_bam.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,18 @@ echo "call cell ..."
mat_file=${OUTPUT_DIR}/raw_matrix/${PEAK_CALLER}/matrix.mtx
${curr_dir}/call_cell.sh $mat_file $2 $3

## 6. mapping qc for cell barcodes
## 6. remove doublets
filtered_mtx_file=${OUTPUT_DIR}/filtered_matrix/${PEAK_CALLER}/${CELL_CALLER}/matrix.rds
${curr_dir}/rmDoublets.sh ${filtered_mtx_file},0.03 $2 $3

## 7. mapping qc for cell barcodes
map_dir=${OUTPUT_DIR}/mapping_result
input_bam=${map_dir}/${OUTPUT_PREFIX}.positionsort.bam
input_bc=${OUTPUT_DIR}/filtered_matrix/${PEAK_CALLER}/${CELL_CALLER}/barcodes.txt
input_bc=${OUTPUT_DIR}/filtered_matrix/${PEAK_CALLER}/${CELL_CALLER}/barcodes_doubletsRemoved.txt
${curr_dir}/get_bam4Cells.sh ${input_bam},${input_bc} $2 $3


## report preprocessing QC
## 8.report preprocessing QC
echo "generating report ..."
${curr_dir}/report.sh $OUTPUT_DIR/summary $2 $3
${curr_dir}/report.sh ${OUTPUT_DIR}/summary $2 $3


2 changes: 1 addition & 1 deletion scripts/src/rmDoublets.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source_local('dsAnalysis_utilities.R')
args = commandArgs(T)
inputObj_file = args[1] ## a mtx.rds or a seurat.rds file
drate = as.numeric(args[2])
if(is.null(drate)) drate = 0.4
if(is.null(drate)) drate = 0.03
input.obj = readRDS(inputObj_file)
if(any(class(input.obj) == 'Seurat')) {
seurat.obj = input.obj
Expand Down
4 changes: 3 additions & 1 deletion scripts/src/scATAC-pro_report.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ if(file.exists(cell_mapping_qc_file)) cell_mapping_qc = fread(cell_mapping_qc_fi


bc_stat_file = paste0(params$output_dir, '/summary/', OUTPUT_PREFIX, '.', PEAK_CALLER, '.qc_per_barcode.txt')
selected_bcs = paste0(params$output_dir, '/filtered_matrix/', PEAK_CALLER, '/', CELL_CALLER, '/barcodes.txt')
selected_bcs = paste0(params$output_dir, '/filtered_matrix/', PEAK_CALLER, '/', CELL_CALLER, '/barcodes_doubletsRemoved.txt')
if(!file.exists(selected_bcs)) selected_bcs = paste0(params$output_dir, '/filtered_matrix/', PEAK_CALLER, '/', CELL_CALLER, '/barcodes.txt')

peak_file = paste0(params$output_dir, '/peaks/', PEAK_CALLER, '/', OUTPUT_PREFIX, '_features_BlacklistRemoved.bed')

bc_stat = fread(bc_stat_file)
Expand Down

0 comments on commit 0a77b85

Please sign in to comment.