From 1a560be81a04b3af12301aec55b5305c2e0fa1f5 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 23 Mar 2021 12:21:38 -0600 Subject: [PATCH] Fix fast5 detection --- ont/ont-transfer.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ont/ont-transfer.sh b/ont/ont-transfer.sh index fa3988d..fa2d90b 100755 --- a/ont/ont-transfer.sh +++ b/ont/ont-transfer.sh @@ -15,7 +15,7 @@ fi # Find the directory we are supposed to copy # If no directory was passed, check to see if the current directory will work if [ "$FOLDERIN" = "" ]; then - if [ -d "fast5_pass" ]; then + if [[ -n $(find . -type d -name "fast9_pass") ]]; then FOLDERPATH="$PWD" FOLDERNAME=$(basename "$PWD") else @@ -61,9 +61,9 @@ mkdir -p "$USBDRIVE/$FOLDERNAME/fastq" # Copy the files for FASTA in "${KEEPERS[@]}"; do - cp -n $FOLDERPATH/fast5_pass/barcode$FASTA/*.fast5 $USBDRIVE/$FOLDERNAME/fast5 2> /dev/null - cp -n $FOLDERPATH/fastq_pass/barcode$FASTA/*.fastq $USBDRIVE/$FOLDERNAME/fastq 2> /dev/null - cp -n $FOLDERPATH/fastq_pass/barcode$FASTA/*.fastq.gz $USBDRIVE/$FOLDERNAME/fastq 2> /dev/null + cp -n $FOLDERPATH/*/fast5_pass/barcode$FASTA/*.fast5 $USBDRIVE/$FOLDERNAME/fast5 2> /dev/null + cp -n $FOLDERPATH/*/fastq_pass/barcode$FASTA/*.fastq $USBDRIVE/$FOLDERNAME/fastq 2> /dev/null + cp -n $FOLDERPATH/*/fastq_pass/barcode$FASTA/*.fastq.gz $USBDRIVE/$FOLDERNAME/fastq 2> /dev/null done # Make sure we end on a happy note, regardless if there were actually 96 barcodes