Skip to content

Commit

Permalink
Adjusted bash script for metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Roxanne Wolthuis committed Feb 18, 2022
1 parent c652f7d commit 013a439
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions run_pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,27 @@ python juno-amr.py --queue "${QUEUE}" -i "${input_dir}/clean_fastq/" -o "${outpu
result=$?

# Propagate metadata
# SEQ_KEYS=
# SEQ_ENV=`env | grep irods_input_sequencing`
# for SEQ_AVU in ${SEQ_ENV}
# do
# SEQ_KEYS="${SEQ_KEYS} ${SEQ_AVU%%=*}"
# done

# for key in $SEQ_KEYS irods_input_illumina__Flowcell irods_input_illumina__Instrument \
# irods_input_illumina__Date irods_input_illumina__Run_number irods_input_illumina__Run_Id
# do
# if [ ! -z ${!key} ] ; then
# attrname=${key:12}
# attrname=${attrname/__/::}
# echo "${attrname}: '${!key}'" >> ${OUTPUTDIR}/metadata.yml
# fi
# done

set +euo pipefail

SEQ_KEYS=
SEQ_ENV=`env | grep irods_input_sequencing`
for SEQ_AVU in ${SEQ_ENV}
do
SEQ_KEYS="${SEQ_KEYS} ${SEQ_AVU%%=*}"
done

for key in $SEQ_KEYS irods_input_illumina__Flowcell irods_input_illumina__Instrument \
irods_input_illumina__Date irods_input_illumina__Run_number irods_input_illumina__Run_Id
do
if [ ! -z ${!key} ] ; then
attrname=${key:12}
attrname=${attrname/__/::}
echo "${attrname}: '${!key}'" >> ${OUTPUTDIR}/metadata.yml
fi
done

set -euo pipefail

exit ${result}
# Produce svg with rules
Expand Down

0 comments on commit 013a439

Please sign in to comment.