Skip to content

Commit

Permalink
Update to catalog2 creation following preservation method query
Browse files Browse the repository at this point in the history
  • Loading branch information
mwyczalkowski committed Mar 6, 2023
1 parent a8392f9 commit 935e2d5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion 1_run_discovery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ mkdir -p logs
LOGE="logs/1_run_discovery.err"
LOGO="logs/1_run_discovery.out"

CMD="bash src/run_discovery.sh $@ -J 10 -vvv -t $GDC_TOKEN $CASES > $LOGO 2> $LOGE"
NJOBS="5"

CMD="bash src/run_discovery.sh $@ -J $NJOBS -vvv -t $GDC_TOKEN $CASES > $LOGO 2> $LOGE"
>&2 echo Running: $CMD
>&2 echo Writing logs to $LOGO and $LOGE
eval $CMD
Expand Down
5 changes: 4 additions & 1 deletion src/make_catalog2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ function get_SN {
# * sample submitter id
# * sample id
# * sample type
# * preservation method (NEW)
# * aliquot submitter id
# * aliquot id
# * analyte_type
Expand All @@ -333,9 +334,11 @@ function get_sample_type {
ALIQUOT_NAME=$1
ALIQUOTS_FN=$2

# >&2 echo DEBUG: get_sample_type ALIQUOT_NAME = $ALIQUOT_NAME ALIQUOTS_FN = $ALIQUOTS_FN

# Matching to ALIQUOT name with grep is inexact
# SAMPLE_TYPE=$(grep $ALIQUOT_NAME $ALIQUOTS_FN | cut -f 4 | sort -u)
SAMPLE_TYPE=$(awk -v AN=$ALIQUOT_NAME 'BEGIN{FS="\t";OFS="\t"}{if ($5 == AN ) print $4}' $ALIQUOTS_FN | sort -u)
SAMPLE_TYPE=$(awk -v AN=$ALIQUOT_NAME 'BEGIN{FS="\t";OFS="\t"}{if ($6 == AN ) print $4}' $ALIQUOTS_FN | sort -u)
MATCH_COUNT=$(echo -n "$SAMPLE_TYPE" | grep -c '^')
if [ $MATCH_COUNT == 0 ]; then
>&2 echo ERROR: Sample type for aliquot $ALIQUOT_NAME not found in $ALIQUOTS_FN
Expand Down
3 changes: 2 additions & 1 deletion src/queryGDC.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@

# #########

PYTHON="/usr/bin/python3"
#PYTHON="/usr/bin/python3"
PYTHON="/diskmnt/Projects/Users/mwyczalk/miniconda3/bin/python"
JQ="jq"

if ! command -v $JQ &> /dev/null
Expand Down

0 comments on commit 935e2d5

Please sign in to comment.