Skip to content

Commit

Permalink
remove module_dir variable
Browse files Browse the repository at this point in the history
  • Loading branch information
allyhawkins committed Jan 9, 2025
1 parent 6b7c342 commit 939103f
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions analyses/cell-type-consensus/assign-consensus-celltypes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,18 @@ set -euo pipefail

# navigate to where script lives
cd $(dirname "$0")
module_dir=$(pwd)
#module_dir=$(pwd)

data_dir="${module_dir}/../../data/current"
data_dir="../../data/current"
# path to save consensus results
scpca_consensus_assignments_file="${module_dir}/results/scpca-consensus-celltype-assignments.tsv"
scpca_consensus_assignments_file="results/scpca-consensus-celltype-assignments.tsv"
# directory to store all individual tsv files
celltype_tsv_dir="${module_dir}/results/original-celltype-assignments"
celltype_tsv_dir="results/original-celltype-assignments"
mkdir -p ${celltype_tsv_dir}

# define scripts and notebook directories
scripts_dir="${module_dir}/scripts"

# define reference input files
panglao_ref_file="${module_dir}/references/panglao-cell-type-ontologies.tsv"
consensus_ref_file="${module_dir}/references/consensus-cell-type-reference.tsv"
panglao_ref_file="references/panglao-cell-type-ontologies.tsv"
consensus_ref_file="references/consensus-cell-type-reference.tsv"

# run script to export tsv file on all processed objects
for sce_file in $data_dir/*/SCPCS*/*_processed.rds; do
Expand All @@ -35,15 +32,15 @@ for sce_file in $data_dir/*/SCPCS*/*_processed.rds; do

echo "Grabbing cell types for ${library_id}"
# get celltypes as tsv file
Rscript $scripts_dir/03-save-coldata.R \
Rscript scripts/03-save-coldata.R \
--sce_file $sce_file \
--output_file ${celltype_tsv_dir}/${library_id}_celltype-assignments.tsv

done

echo "Combining TSVs and adding consensus labels"
# run script to combine all tsv files and assign consensus cell types
Rscript $scripts_dir/04-combine-celltype-tables.R \
Rscript scripts/04-combine-celltype-tables.R \
--celltype_tsv_dir $celltype_tsv_dir \
--panglao_ref_file $panglao_ref_file \
--consensus_ref_file $consensus_ref_file \
Expand Down

0 comments on commit 939103f

Please sign in to comment.