-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into jaclyn-taroni/711-use-rms-de
- Loading branch information
Showing
5 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -315,6 +315,7 @@ oncoproteins | |
OPC | ||
OPCs | ||
OpenPBTA | ||
OpenScPCA | ||
Optimus | ||
orking | ||
orthotopic | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
The shell script in this directory downloads processed `SingleCellExperiment` objects and metadata from tumor samples in `SCPCP000015` using the data download mechanism from OpenScPCA. | ||
|
||
You may want to run it with your OpenScPCA conda environment activated. | ||
|
||
By default, it will use an AWS profile called `openscpca` and download data from the `2024-08-22` OpenScPCA release. | ||
|
||
You can alter the AWS profile or release with the following: | ||
|
||
```sh | ||
PROFILE={profile} RELEASE={release} ./download-openscpca-data.sh | ||
``` | ||
|
||
Replacing `{profile}` and `{release}` with a profile with OpenScPCA access and valid release, respectively. |
68 changes: 68 additions & 0 deletions
68
scRNA-seq-advanced/setup/ewing-sarcoma/download-openscpca-data.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# Profile to use with the download script | ||
PROFILE=${PROFILE:-openscpca} | ||
# Release to download | ||
RELEASE=${RELEASE:-2024-11-25} | ||
|
||
# Set the working directory to the directory of this file | ||
cd "$(dirname "${BASH_SOURCE[0]}")" | ||
|
||
# Set up directories | ||
ewing_data_dir="../../data/ewing-sarcoma" | ||
annotations_dir="${ewing_data_dir}/annotations" | ||
processed_dir="${ewing_data_dir}/processed" | ||
|
||
# Create directories if they don't exist yet | ||
mkdir -p "${annotations_dir}" | ||
mkdir -p "${processed_dir}" | ||
|
||
# Get download data script from OpenScPCA for convenience | ||
curl -O \ | ||
-L https://raw.githubusercontent.com/AlexsLemonade/OpenScPCA-analysis/a3d8a2c9144e8edb3894a7beeb89cdc6c3e6d681/download-data.py | ||
# Make executable | ||
chmod +x download-data.py | ||
|
||
# Download Ewing sarcoma tumor samples | ||
./download-data.py \ | ||
--samples 'SCPCS000490,SCPCS000492,SCPCS000493,SCPCS000494,SCPCS000495,SCPCS000496,SCPCS000749' \ | ||
--format SCE \ | ||
--release ${RELEASE} \ | ||
--data-dir ${ewing_data_dir} \ | ||
--profile ${PROFILE} | ||
|
||
# # Download Ewing sarcoma metadata | ||
./download-data.py \ | ||
--projects SCPCP000015 \ | ||
--metadata-only \ | ||
--release ${RELEASE} \ | ||
--data-dir ${ewing_data_dir} \ | ||
--profile ${PROFILE} | ||
|
||
# Remove existing files from processed directory | ||
if [ -z "$( ls -A ${processed_dir} )" ]; then | ||
echo "No processed files yet!" | ||
else | ||
rm -r ${processed_dir}/* | ||
fi | ||
|
||
# Move files from release folder | ||
mv ${ewing_data_dir}/${RELEASE}/SCPCP000015/* ${processed_dir} | ||
mv "${processed_dir}/single_cell_metadata.tsv" "${annotations_dir}/ewing_sarcoma_sample_metadata.tsv" | ||
|
||
# Remove PDX samples from metadata | ||
Rscript - << EOF | ||
sample_metadata_df <- readr::read_tsv("${annotations_dir}/ewing_sarcoma_sample_metadata.tsv") | ||
sample_metadata_df |> | ||
dplyr::filter(stringr::str_detect(sample_type, "xenograft", negate = TRUE)) |> | ||
readr::write_tsv("${annotations_dir}/ewing_sarcoma_sample_metadata.tsv") | ||
EOF | ||
|
||
# Clean up download data script | ||
rm download-data.py | ||
# Clean up the remnants of download structure | ||
rm -r ${ewing_data_dir}/${RELEASE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters