Cleanup find command

This commit is contained in:
Thomas A. Christensen II 2021-04-22 11:07:07 -06:00
parent c7545ae55d
commit 42d3d542b9
Signed by: millironx
GPG key ID: 139C07724802BC5D

View file

@ -72,7 +72,7 @@ mkdir -p "$FASTQPATH"
# Copy the files # Copy the files
for FASTA in ${KEEPERS[@]}; do for FASTA in ${KEEPERS[@]}; do
# Check to see if there are any files here # Check to see if there are any files here
if [[ -n $(find $FOLDERPATH -type f \( -name "*.fast5" \) -path "*_pass*barcode$FASTA*") ]]; then if [[ -n $(find $FOLDERPATH -type f -name "*.fast5" -path "*_pass*barcode$FASTA*") ]]; then
# Find the uid that the GridION gives to this sample # Find the uid that the GridION gives to this sample
ONTID=$(find $FOLDERPATH -name "*.fast5" -path "*_pass*barcode*$FASTA*" | head -n 1 | xargs basename | awk '{split($0,a,"_"); print a[4]}') ONTID=$(find $FOLDERPATH -name "*.fast5" -path "*_pass*barcode*$FASTA*" | head -n 1 | xargs basename | awk '{split($0,a,"_"); print a[4]}')