You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created this script to iterate through the kreport files and run the combine_kreports.py file on them to combine. However, I am getting a ZeroDivisionError.
FILES=()
NAMES=()
for DIR in $(find $PARENT_DIR -mindepth 1 -maxdepth 1 -type d); do
SAMPLE_NAME=$(basename $DIR)
echo "Checking directory: $DIR"
KRAKEN_FILE=$(find $DIR -type f -name "*.kraken")
echo "Found file: $KRAKEN_FILE"
if [ -n "$KRAKEN_FILE" ]; then
FILES+=("$KRAKEN_FILE")
NAMES+=("$SAMPLE_NAME")
fi
done
# Convert arrays to space-separated strings
FILES_STR="${FILES[@]}"
NAMES_STR=$(IFS="," ; echo "${NAMES[*]}")
# Define the output file name
OUTPUT_FILE="${PARENT_DIR}/combined_kraken_output.txt"
# Print the gathered files and names for debugging
echo "Files: $FILES_STR"
echo "Names: $NAMES_STR"
# Run the combine_bracken_output.py script with the found files and sample names
python3 /global/scratch/projects/fc_wolflab/software/KrakenTools/combine_kreports.py -r ${FILES[@]} -o $OUTPUT_FILE
I created this script to iterate through the kreport files and run the combine_kreports.py file on them to combine. However, I am getting a ZeroDivisionError.
The text was updated successfully, but these errors were encountered: