Shell script for assembling sets of pair-end reads using unicycler
0
0
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
unicycler script shell assemble • 990 views
ADD COMMENT
1
Entering edit mode

, I am having some problems while running my home script to assemble. B

see https://meta.stackexchange.com/questions/147616/

ADD REPLY
0
Entering edit mode

Thank you for your reply. I found the mistake in my script and solved it.

ADD REPLY

Login before adding your answer.

Traffic: 4101 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6