-
Notifications
You must be signed in to change notification settings - Fork 0
/
just run Phoenix
50 lines (38 loc) · 1.63 KB
/
just run Phoenix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
#Pipeline for running and organizing output from PHoeNIx *without having to make a sample sheet first
#Do not use this script if you need to make the sample sheet; there is a different script for that
#Make sure PHoeNIx and Kraken2 are installed on your computer, and make sure you have the Standard-08 database installed in /kraken2-master/Standard-08
#Put all reads in /kraken2-master/reads
##Each set of reads must be in a folder with the LIMS ID as the folder name
##There cannot be any other files in the reads directory besides each set of fastq files in their folders
#Output will be in output.tsv in /kraken2-master/results
##Make sure there is not already a file called output.tsv in that directory
#Working directory must be /kraken2-master
#Before starting, activate your phoenix Conda environment (conda activate phoenix)
#Edit script so paths are correct for your computer:
samplesheet=/home/mdungsmain/Janis/Programs/Kraken2/kraken2-master/samplesheet.csv
output=/home/mdungsmain/Janis/Programs/Kraken2/kraken2-master/results/output.csv
home=/home/mdungsmain/Janis/Programs/Kraken2/kraken2-master/
cd $home
#Run PHoeNIx
nextflow run phoenix/main.nf -profile docker -entry PHOENIX --kraken2db ./Standard-08 --input $samplesheet
#Organize the output
cd results/
for dir2 in */
do
printf "${dir2}" >> $output
printf "\n\n" >> $output
cd $dir2
cat *summaryline.tsv >> $output
printf "\n\n" >> $output
cat *synopsis >> $output
printf "\n\n" >> $output
cd ./ANI/
cat *fastANI.txt >> $output
printf "\n\n" >> $output
cd ..
cd ./AMRFinder/
cat *all_genes.tsv >> $output
printf "\n\n\n\n" >> $output
cd $results
done