diff --git a/README.md b/README.md index 7cd1573..ec817a2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Workstation Housekeeping Scripts to manage data on the NGS workstation +--- + ## backup_runfolder.py v1.0 Uploads an Illumina runfolder to DNANexus. @@ -19,3 +21,16 @@ This tool requires the DNAnexus utilities `ua` (upload agent) and `dx` (DNAnexus * From a list of files in the runfolder, files matching any of the comma-separated strings passed to `--ignore` are removed. The default is '/L00', which ignores BCL files in directories with this prefix. To upload all files in a runfolder, pass the argument `--ignore ""`. * Finally, each remaining file is passed to the DNAnexus `ua` utility. This will attempt an upload if the files are not found in the expected location in the DNAnexus project. The number of upload tries is set to 100 with the `--tries` flag. * Logs from this and the script are written to STDERR and a logfile, named after the runfolder. A destination for this file can be passed to the `--logpath` flag. + +--- + +## findfastqs.sh +Report the number of gzipped fastq files in an Illumina runfolder. + +### Usage +``` +$ findfastqs.sh RUNFOLDER +>>> RUNFOLDER has 156 demultiplexed fastq files with 2 undetermined. Total: 158 +``` + +--- \ No newline at end of file diff --git a/findfastqs.sh b/findfastqs.sh new file mode 100755 index 0000000..cc2d00b --- /dev/null +++ b/findfastqs.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Commands to help with runfolder managemenet (Nana) +findfastqs(){ + input_directory=$1 + # Find all fastqs in the input directory. + # Grep -v filters out undetermined fastqs from this list, which are not typically uploaded to DNAnexus + numfqs=$(find $input_directory -iname "*.fastq.gz" | grep -v "Undetermined" | wc -l); + # Count the number of undetermined fastqs in input directory + undetermined=$(find $1 -iname "Undetermined*.fastq.gz" | wc -l); + total=$((numfqs + undetermined)) + echo "$input_directory has $numfqs demultiplexed fastq files with $undetermined undetermined. Total: $total"; + } + +findfastqs $1 \ No newline at end of file