Commit 007d10a8 authored by peguerin's avatar peguerin
Browse files

build rapidrun ref db

parent e8d09b0a
###############################################################################
## RAPIDRUN
SINGULARITY_SIMG="/media/superdisk/utils/conteneurs/obitools.simg"
singularity shell --bind /media/superdisk:/media/superdisk $SINGULARITY_SIMG
source ./config.sh
for marker in `awk -F, '{ print $1}' infos/markers.csv`
do
primer3=`grep $marker infos/markers.csv | cut -d, -f2`
primer5=`grep $marker infos/markers.csv | cut -d, -f3`
echo $marker $primer3 $primer5
MARKER_REF_DB_DIR="../"${marker}"_reference_database"
mkdir -p "${MARKER_REF_DB_DIR}"
for DX in `ls "${rd_prefix}"*dx`
do
DX_PATH=`readlink -f $DX`
ln -s $DX_PATH $MARKER_REF_DB_DIR/$DX
done
cd "${MARKER_REF_DB_DIR}"
ecoPCR -d "${rd_prefix}" -e "${ecoPCR_e}" -l "${ecoPCR_l}" -L "${ecoPCR_L}" "${primer5}" "${primer3}" > v_"${rd_prefix}".ecopcr
obigrep -d "${rd_prefix}" --require-rank=species --require-rank=genus --require-rank=family v_"${rd_prefix}".ecopcr > v_"${rd_prefix}"_clean.fasta
obiuniq -d "${rd_prefix}" v_"${rd_prefix}"_clean.fasta > v_"${rd_prefix}"_clean_uniq.fasta
obigrep -d "${rd_prefix}" --require-rank=family v_"${rd_prefix}"_clean_uniq.fasta > v_"${rd_prefix}"_clean_uniq_clean.fasta
obiannotate --uniq-id v_"${rd_prefix}"_clean_uniq_clean.fasta > db_"${rd_prefix}".fasta
cd ../reference_database
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment