Skip to content
Snippets Groups Projects
Commit 57535ba3 authored by not populated not populated's avatar not populated not populated
Browse files

Fixed filename/folder paths at end to match new organizational structure

parent 55e0eef2
No related branches found
No related tags found
1 merge request!3Ultra 2 SOP/doc updates
......@@ -34,19 +34,19 @@ cd $WORK_DIR/$FAMILY_ID
bcbio_nextgen.py $CONFIG_FILE -n $SLURM_CPUS_PER_TASK -t local
exit
DATE=$(basename `tail log/bcbio-nextgen.log | grep 'Storing in local filesystem' | tail -n 1 | awk '{ print $6 }' | perl -pe "s/_${SHORT_PROJECT_ID}.+//"`)
DATE=$(basename `tail log/bcbio-nextgen.log | grep 'Storing in local filesystem' | tail -n 1 | awk '{ print $6 }' | perl -pe "s/_${PROJECT_ID}.+//"`)
FAMILY_DIR=${DATE}_${SHORT_PROJECT_ID}_${VERSION}_${FAMILY_ID}
if [ -e $OUTPUT_DIR/${DATE}_${SHORT_PROJECT_ID}_${FAMILY_ID} ]
if [ -e $OUTPUT_DIR/$FAMILY_DIR ]
then
for INDV in `cut -f 2 $OUTPUT_DIR/${SHORT_PROJECT_ID}_${VERSION}/params/${PROJECT_ID}_${FAMILY_ID}.ped`
do
mv $OUTPUT_DIR/$INDV $OUTPUT_DIR/${DATE}_${PROJECT_ID}_${FAMILY_ID}/
mv $OUTPUT_DIR/$INDV $OUTPUT_DIR/$FAMILY_DIR/
done
# fix VCF output file names
cd $OUTPUT_DIR/${DATE}_${PROJECT_ID}_${FAMILY_ID}
cd $OUTPUT_DIR/$FAMILY_DIR
if [ ! -e ${FAMILY_ID}-gatk-haplotype-annotated.vcf.gz ]
then
PREFIX=`echo $FAMILY_ID | cut -d '_' -f 1`
......@@ -55,6 +55,10 @@ then
mv ${PREFIX}${SUFFIX}-gatk-haplotype-annotated.vcf.gz.tbi ${FAMILY_ID}-gatk-haplotype-annotated.vcf.gz.tbi
fi
cd $OUTPUT_DIR
mkdir -p ${SHORT_PROJECT_ID}_${VERSION}/families
mv $FAMILY_DIR ${SHORT_PROJECT_ID}_${VERSION}/families/
else
echo $OUTPUT_DIR/${DATE}_${PROJECT_ID}_${FAMILY_ID} does not exist.
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment