Mercurial > repos > iss > eurl_vtec_wgs_pt
comparison scripts/serotype.sh @ 0:c6bab5103a14 draft
"planemo upload commit 6abf3e299d82d07e6c3cf8642bdea80e96df64c3-dirty"
author | iss |
---|---|
date | Mon, 21 Mar 2022 15:23:09 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c6bab5103a14 |
---|---|
1 tooldir="$1"; | |
2 paired="$2"; | |
3 fastqfile1="$3"; | |
4 fastqfile2="$4"; | |
5 fastafile="$5"; | |
6 | |
7 ln -s $fastqfile1 fastqfile1; | |
8 ln -s $fastqfile2 fastqfile2; | |
9 # FILTER + ASSEMBLE + BLAST FASTQ | |
10 chmod u+x $tooldir/scripts/duk | |
11 if [ $paired = "y" ] | |
12 then | |
13 $tooldir/scripts/duk -m filteredO1.fq -k 23 $tooldir/data/O_type.fsa $fastqfile1; | |
14 $tooldir/scripts/duk -m filteredH1.fq -k 23 $tooldir/data/H_type.fsa $fastqfile1; | |
15 cat filteredO1.fq > filteredOH1.fq; | |
16 cat filteredH1.fq >> filteredOH1.fq; | |
17 $tooldir/scripts/duk -m filteredO2.fq -k 23 $tooldir/data/O_type.fsa $fastqfile2; | |
18 $tooldir/scripts/duk -m filteredH2.fq -k 23 $tooldir/data/H_type.fsa $fastqfile2; | |
19 cat filteredO2.fq > filteredOH2.fq; | |
20 cat filteredH2.fq >> filteredOH2.fq; | |
21 $tooldir/scripts/fastq_pair filteredOH1.fq filteredOH2.fq; | |
22 $tooldir/scripts/fastq_pair filteredOH1.fq.single.fq fastqfile2; | |
23 $tooldir/scripts/fastq_pair filteredOH2.fq.single.fq fastqfile1; | |
24 cat filteredOH1.fq.paired.fq > filteredOH1_paired.fq; | |
25 cat filteredOH1.fq.single.fq.paired.fq >> filteredOH1_paired.fq; | |
26 cat fastqfile1.paired.fq >> filteredOH1_paired.fq; | |
27 cat filteredOH2.fq.paired.fq > filteredOH2_paired.fq; | |
28 cat fastqfile2.paired.fq >> filteredOH2_paired.fq; | |
29 cat filteredOH2.fq.single.fq.paired.fq >> filteredOH2_paired.fq; | |
30 dukst1filesize=$(wc -c "filteredOH1_paired.fq" | awk '{print $1}'); | |
31 dukst2filesize=$(wc -c "filteredOH2_paired.fq" | awk '{print $1}'); | |
32 if [ $dukst1filesize -gt 0 ] && [ $dukst2filesize -gt 0 ] | |
33 then | |
34 perl $tooldir/scripts/spades.pl duk_spades.fasta duk_spades_contig_stats duk_spades_scaffolds duk_spades_scaffold_stats duk_spades_log NODE spades.py --disable-gzip-output --isolate -t \${GALAXY_SLOTS:-16} --pe1-ff --pe1-1 fastq:filteredOH1_paired.fq --pe1-2 fastq:filteredOH2_paired.fq | |
35 rm -r output_dir; | |
36 blastn -query duk_spades.fasta -db $tooldir/data/O_type -task blastn -evalue 0.001 -out duk_O_seqs -outfmt '6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen salltitles' -num_threads 8 -strand both -dust yes -max_target_seqs 10 -perc_identity 95.0; | |
37 blastn -query duk_spades.fasta -db $tooldir/data/H_type -task blastn -evalue 0.001 -out duk_H_seqs -outfmt '6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen salltitles' -num_threads 8 -strand both -dust yes -max_target_seqs 10 -perc_identity 95.0; | |
38 else | |
39 touch duk_O_seqs; | |
40 touch duk_H_seqs; | |
41 fi | |
42 else | |
43 $tooldir/scripts/duk -m filteredO1.fq -k 23 $tooldir/data/O_type.fsa $fastqfile1; | |
44 $tooldir/scripts/duk -m filteredH1.fq -k 23 $tooldir/data/H_type.fsa $fastqfile1; | |
45 cat filteredO1.fq > filteredOH1.fq; | |
46 cat filteredH1.fq >> filteredOH1.fq; | |
47 dukstx1filesize=$(wc -c "filteredOH1.fq" | awk '{print $1}'); | |
48 if [ $dukstx1filesize -gt 0 ] | |
49 then | |
50 perl $tooldir/scripts/spades.pl duk_spades.fasta duk_spades_contig_stats duk_spades_scaffolds duk_spades_scaffold_stats duk_spades_log NODE spades.py --disable-gzip-output --isolate -t \${GALAXY_SLOTS:-16} --iontorrent -s fastq:filteredOH1.fq; | |
51 rm -r output_dir; | |
52 blastn -query duk_spades.fasta -db $tooldir/data/O_type -task blastn -evalue 0.001 -out duk_O_seqs -outfmt '6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen salltitles' -num_threads 8 -strand both -dust yes -max_target_seqs 10 -perc_identity 95.0; | |
53 blastn -query duk_spades.fasta -db $tooldir/data/H_type -task blastn -evalue 0.001 -out duk_H_seqs -outfmt '6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen salltitles' -num_threads 8 -strand both -dust yes -max_target_seqs 10 -perc_identity 95.0; | |
54 else | |
55 touch duk_O_seqs; | |
56 touch duk_H_seqs; | |
57 fi | |
58 fi | |
59 # BLAST FASTA | |
60 blastn -query $fastafile -db $tooldir/data/O_type -task blastn -evalue 0.001 -out fasta_O_seqs -outfmt '6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen salltitles' -num_threads 8 -strand both -dust yes -max_target_seqs 10 -perc_identity 95.0; | |
61 blastn -query $fastafile -db $tooldir/data/H_type -task blastn -evalue 0.001 -out fasta_H_seqs -outfmt '6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen salltitles' -num_threads 8 -strand both -dust yes -max_target_seqs 10 -perc_identity 95.0; | |
62 | |
63 # COMBINE | |
64 cat duk_O_seqs > serogroup_O; | |
65 cat fasta_O_seqs >> serogroup_O; | |
66 cat duk_H_seqs > serogroup_H; | |
67 cat fasta_H_seqs >> serogroup_H; |