Entering edit mode
2.7 years ago
kyotorashi
•
0
Hi guys, I am having some problems while running my home script to assemble. Below is the script. Thank you all in advance!
# Script interpreted by bash shell
#!/bin/bash
# Source to my bashrc file in /home/liu
source ~/.bashrc
# Folder with pair-end reads
folder="./L_brevis"
# Build a list of fastq files in the folder
files=($folder/*.fastq.gz)
echo "files: $files"
# Loop through all fastq files in pairs
for ((i=0; i<${#files[@]}; i+=2)); do
# Get the path to current pairs of reads
read1=${file[i]}
read2=${file[i+1]}
# Extract sample name of ecery pair
sample_name=${read1%_R1.*}
mkdir "$sample_name"_assembly
# Debug to print the values of read1 and read2
echo "read1: $read1"
echo "read2: $read2"
# Assemble paried-reads using Unicycler
conda activate liu_tools_env
unicycler -1 "$read1" -2 "$read2" -o "$folder/$sample_name"_assembly
done
see https://meta.stackexchange.com/questions/147616/
Thank you for your reply. I found the mistake in my script and solved it.