-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #187 from Daniel-VM/hotfix
New Bacterial Genome Assembly Template: Short, Long, and Hybrid Sequences
- Loading branch information
Showing
6 changed files
with
372 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,21 @@ | ||
mkdir -p 00-reads | ||
cd 00-reads; cat ../samples_id.txt | xargs -I % echo "ln -s ../../RAW/%_*R1*.fastq.gz %_R1.fastq.gz" | bash; cd - | ||
cd 00-reads; cat ../samples_id.txt | xargs -I % echo "ln -s ../../RAW/%_*R2*.fastq.gz %_R2.fastq.gz" | bash; cd - | ||
mv ANALYSIS01_ASSEMBLY $(date '+%Y%m%d')_ANALYSIS01_ASSEMBLY | ||
cd 00-reads | ||
|
||
# Loop through each file in the directory | ||
while IFS= read -r sample; do | ||
# Extract the file name with&without extension | ||
filename_noext=$(basename -s .fastq.gz ../../RAW/${sample}*) | ||
|
||
### Check if the file is a short read or long read | ||
for fileitem in $filename_noext; do | ||
if [[ "$fileitem" =~ _R[12] ]]; then | ||
ln -s -f ../../RAW/${sample}*_R1*.fastq.gz ${sample}_R1.fastq.gz | ||
ln -s -f ../../RAW/${sample}*_R2*.fastq.gz ${sample}_R2.fastq.gz | ||
elif [[ ! "$fileitem" =~ _R[12] ]]; then | ||
ln -s -f ../../RAW/${sample}.fastq.gz ${sample}.fastq.gz | ||
fi | ||
done | ||
done < ../samples_id.txt | ||
|
||
cd - | ||
mv ANALYSIS01_ASSEMBLY "$(date '+%Y%m%d')_ANALYSIS01_ASSEMBLY" |
Oops, something went wrong.