Skip to content

Instantly share code, notes, and snippets.

@justincbagley
Last active May 9, 2020 14:00
Show Gist options
  • Save justincbagley/e144aede221c9afe3fc7819c077a3835 to your computer and use it in GitHub Desktop.
Save justincbagley/e144aede221c9afe3fc7819c077a3835 to your computer and use it in GitHub Desktop.
Handy utility shell scripts for cleaning dDocent run folders

dDocent Utility Shell Scripts

Justin C. Bagley, Ph.D.

University of Missouri-St. Louis

This Gist provides a handful of utility shell scripts for use with dDocent, which I wrote in March 2020. Specifically, these scripts are meant to be placed in dDocent run subfolders, in order to provide means of quickly cleaning up the workspace after failed or stopped (ctrl + C) runs. They are sufficiently generic to clean any dDocent run folder, and they range from a minor clean to a deep clean (removes essentially everything generated during run).

Files

  • deep_clean_ddocent_folder.sh
  • basic_clean_ddocent_folder.sh
  • clean_ddocent_folder.sh
  • `activate1.sh

activate1.sh:

#!/bin/bash

source activate ddocent_env;

echo "# "
echo "# "
echo "# "
echo "# "

printenv

clean_ddocent_folder.sh:

#!/bin/sh

rm popmap 
rm namelist 
rm lengths.txt
rm dDocent.runs
rm dDocent_main.LOG
rm dDocent*
#
rm *trim.log
rm temp.LOG
rm trim.log
rm -rf trim_reports/
rm -rf logfiles/
rm *unique.seqs
rm *uniq.seqs
rm uniqseq.data
rm uniq.*

exit 0

basic_clean_ddocent_folder.sh:

#!/bin/sh

rm popmap 
rm namelist 
rm lengths.txt
rm dDocent.runs
rm dDocent_main.LOG
rm dDocent*

exit 0

deep_clean_ddocent_folder.sh:

#!/bin/sh

rm popmap 
rm namelist 
rm lengths.txt
rm dDocent.runs
rm dDocent_main.LOG
rm dDocent*
#
rm *trim.log
rm temp.LOG
rm trim.log
rm -rf trim_reports/
rm -rf logfiles/
rm *unique.seqs
rm *uniq.seqs
rm uniqseq.data
rm *cov.stats
rm uniq.*
rm uniqCperindv
rm ./*.forward
rm ./*.reverse
#rm ./*R1.fq.gz
#rm ./*R2.fq.gz
#
rm reference.fasta.a*
rm reference.fasta.*
rm *RG.bam*
rm mapped.bed 

exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment