Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bash scripts format following ShellCheck #135

Merged
merged 1 commit into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name-template: 'v$NEXT_PATCH_VERSION'
tag-template: 'v$NEXT_PATCH_VERSION'
name-template: 'v$NEXT_MINOR_VERSION'
tag-template: 'v$NEXT_MINOR_VERSION'
categories:
- title: '🧬 Features'
labels:
Expand Down Expand Up @@ -31,4 +31,4 @@ template: |
## Changes
$CHANGES
## 🕵️‍♀️ Full commit logs
- https://github.com/oncokb/oncokb-annotator/compare/$PREVIOUS_TAG...v$NEXT_PATCH_VERSION
- https://github.com/oncokb/oncokb-annotator/compare/$PREVIOUS_TAG...v$NEXT_MINOR_VERSION
38 changes: 19 additions & 19 deletions .github/workflows/compare-study-annotation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,40 @@ jobs:
git checkout -b compare

STUDY=msk_impact_2017
DATAHUB_URL=https://media.githubusercontent.com/media/cBioPortal/datahub/42afc279efb8d9104aba36fa35bad3ec41921949/public/$STUDY
DATAHUB_URL=https://media.githubusercontent.com/media/cBioPortal/datahub/42afc279efb8d9104aba36fa35bad3ec41921949/public/"$STUDY"

MUTATION_DATA_NAME=data_mutations_extended.txt
CLINICAL_DATA_NAME=data_clinical_sample.txt
FUSION_DATA_NAME=data_fusions.txt
CNA_DATA_NAME=data_CNA.txt

cd data
curl -s $DATAHUB_URL/$MUTATION_DATA_NAME -O
curl -s $DATAHUB_URL/$CLINICAL_DATA_NAME -O
curl -s $DATAHUB_URL/$FUSION_DATA_NAME -O
curl -s $DATAHUB_URL/$CNA_DATA_NAME -O
cd data || exit
curl -s "$DATAHUB_URL"/"$MUTATION_DATA_NAME" -O
curl -s "$DATAHUB_URL"/"$CLINICAL_DATA_NAME" -O
curl -s "$DATAHUB_URL"/"$FUSION_DATA_NAME" -O
curl -s "$DATAHUB_URL"/"$CNA_DATA_NAME" -O
cd ..

# create compare folder to add all annotated files
mkdir compare

PREFIX=oncokb
IMAF=data/$MUTATION_DATA_NAME
OMAF=compare/"$PREFIX"_$MUTATION_DATA_NAME
IMAF=data/"$MUTATION_DATA_NAME"
OMAF=compare/"$PREFIX"_"$MUTATION_DATA_NAME"

IC=data/$CLINICAL_DATA_NAME
OC=compare/"$PREFIX"_$CLINICAL_DATA_NAME
IC=data/"$CLINICAL_DATA_NAME"
OC=compare/"$PREFIX"_"$CLINICAL_DATA_NAME"

IF=data/$FUSION_DATA_NAME
OF=compare/"$PREFIX"_$FUSION_DATA_NAME
IF=data/"$FUSION_DATA_NAME"
OF=compare/"$PREFIX"_"$FUSION_DATA_NAME"

ICNA=data/$CNA_DATA_NAME
OCNA=compare/"$PREFIX"_$CNA_DATA_NAME
ICNA=data/"$CNA_DATA_NAME"
OCNA=compare/"$PREFIX"_"$CNA_DATA_NAME"

python MafAnnotator.py -i $IMAF -o $OMAF -c $IC -b $ONCOKB_API_TOKEN
python FusionAnnotator.py -i $IF -o $OF -c $IC -b $ONCOKB_API_TOKEN
python CnaAnnotator.py -i $ICNA -o $OCNA -c $IC -b $ONCOKB_API_TOKEN
python ClinicalDataAnnotator.py -i $IC -o $OC -a $OMAF,$OCNA,$OF
python MafAnnotator.py -i "$IMAF" -o "$OMAF" -c "$IC" -b "$ONCOKB_API_TOKEN"
python FusionAnnotator.py -i "$IF" -o "$OF" -c "$IC" -b "$ONCOKB_API_TOKEN"
python CnaAnnotator.py -i "$ICNA" -o "$OCNA" -c "$IC" -b "$ONCOKB_API_TOKEN"
python ClinicalDataAnnotator.py -i "$IC" -o "$OC" -a "$OMAF,$OCNA,$OF"

git config user.name oncokb-bot
git config user.email dev.oncokb@gmail.com
Expand All @@ -89,7 +89,7 @@ jobs:
# remove everything under compare folder and replace wiht the ones from oncokb-data
rm -f compare/*.txt

cd compare
cd compare || exit
curl -s -H "Authorization: token ${ONCOKB_OAUTH_TOKEN}" https://api.github.com/repos/knowledgesystems/oncokb-data/contents/annotation/$STUDY | jq -r '.[] | .download_url + " " + .name' | while IFS=' ' read -r downloadurl name; do
if [[ "$name" == "$FIEL_NAME_PREFIX"* ]]; then
curl -s "$downloadurl" -o $name
Expand Down
32 changes: 20 additions & 12 deletions example.sh
Original file line number Diff line number Diff line change
@@ -1,36 +1,44 @@
#!/usr/bin/env bash
IMAF="data/example_maf.txt"
OMAF="data/example_maf.oncokb.txt"

IMAF38="data/example_maf_grch38.txt"
OMAF38="data/example_maf_grch38.oncokb.txt"

OMAFHGVSPSHORT="data/example_maf_hgsp_short.oncokb.txt"
OMAFHGVSP="data/example_maf_hgsp.oncokb.txt"
OMAFHGVSG="data/example_maf_hgsg.oncokb.txt"
OMAFGC="data/example_maf_genomic_change.oncokb.txt"

IATYPICALALT="data/example_atypical_alterations.txt"
OATYPICALALT="data/example_atypical_alterations.oncokb.txt"

IF="data/example_fusions.txt"
OF="data/example_fusions.oncokb.txt"

ICNA="data/example_cna.txt"
OCNA="data/example_cna.oncokb.txt"

IC="data/example_clinical.txt"
OC="data/example_clinical.oncokb.txt"

OCPDF="data/example_clinical.oncokb.pdf"

TOKEN="" #OncoKB API Token
README="data/example_README.txt"

python MafAnnotator.py -i $IMAF -o $OMAF -c $IC -b $TOKEN
python MafAnnotator.py -i $IMAF -o $OMAFHGVSPSHORT -c $IC -b $TOKEN -q hgvsp_short
python MafAnnotator.py -i $IMAF -o $OMAFHGVSP -c $IC -b $TOKEN -q hgvsp
python MafAnnotator.py -i $IMAF -o $OMAFHGVSG -c $IC -b $TOKEN -q hgvsg
python MafAnnotator.py -i $IMAF -o $OMAFGC -c $IC -b $TOKEN -q genomic_change
python MafAnnotator.py -i "$IMAF" -o "$OMAF" -c "$IC" -b "$TOKEN"
python MafAnnotator.py -i "$IMAF" -o "$OMAFHGVSPSHORT" -c "$IC" -b "$TOKEN" -q hgvsp_short
python MafAnnotator.py -i "$IMAF" -o "$OMAFHGVSP" -c "$IC" -b "$TOKEN" -q hgvsp
python MafAnnotator.py -i "$IMAF" -o "$OMAFHGVSG" -c "$IC" -b "$TOKEN" -q hgvsg
python MafAnnotator.py -i "$IMAF" -o "$OMAFGC" -c "$IC" -b "$TOKEN" -q genomic_change

python MafAnnotator.py -i $IMAF38 -o $OMAF38 -c $IC -b $TOKEN
python MafAnnotator.py -i "$IMAF38" -o "$OMAF38" -c "$IC" -b "$TOKEN"

python MafAnnotator.py -i $IATYPICALALT -o $OATYPICALALT -c $IC -b $TOKEN
python MafAnnotator.py -i "$IATYPICALALT" -o "$OATYPICALALT" -c "$IC" -b "$TOKEN"

python FusionAnnotator.py -i $IF -o $OF -c $IC -b $TOKEN
python CnaAnnotator.py -i $ICNA -o $OCNA -c $IC -b $TOKEN
python ClinicalDataAnnotator.py -i $IC -o $OC -a $OMAF,$OATYPICALALT,$OCNA,$OF
python OncoKBPlots.py -i $OC -o $OCPDF -c ONCOTREE_CODE #-n 10
python GenerateReadMe.py -o $README
python FusionAnnotator.py -i "$IF" -o "$OF" -c "$IC" -b "$TOKEN"
python CnaAnnotator.py -i "$ICNA" -o "$OCNA" -c "$IC" -b "$TOKEN"
python ClinicalDataAnnotator.py -i "$IC" -o "$OC" -a "$OMAF,$OATYPICALALT,$OCNA,$OF"
python OncoKBPlots.py -i "$OC" -o "$OCPDF" -c ONCOTREE_CODE #-n 10
python GenerateReadMe.py -o "$README"