Skip to content

Commit

Permalink
fix: adaptd contig_priors to used contig name style (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolai-vKuegelgen committed Feb 16, 2024
1 parent fab3e36 commit 5cd358c
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions snappy_wrappers/wrappers/gcnv/contig_ploidy/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,24 @@
export OMP_NUM_THREADS={snakemake.threads}
export THEANO_FLAGS="base_compiledir=$TMPDIR/theano_compile_dir"
# Get contig name style
grep "SN:chr" {snakemake.input.interval_list} && true
exit_status=$?
if [[ exit_status == 0]] ; then
STYLE="chr"
else
STYLE=""
fi
PRIORS=$TMPDIR/ploidy_priors.tsv
echo -e "CONTIG_NAME\tPLOIDY_PRIOR_0\tPLOIDY_PRIOR_1\tPLOIDY_PRIOR_2\tPLOIDY_PRIOR_3" \
> $PRIORS
for i in {{1..22}}; do
echo -e "$i\t0\t0.01\t0.98\t0.01" >> $PRIORS
echo -e "$STYLE$i\t0\t0.01\t0.98\t0.01" >> $PRIORS
done
echo -e "X\t0.01\t0.49\t0.49\t0.01" >> $PRIORS
echo -e "Y\t0.495\t0.495\t0.01\t0" >> $PRIORS
echo -e "${STYLE}X\t0.01\t0.49\t0.49\t0.01" >> $PRIORS
echo -e "${STYLE}Y\t0.495\t0.495\t0.01\t0" >> $PRIORS
set -x
Expand Down

0 comments on commit 5cd358c

Please sign in to comment.