nzimmer_metageno2/wgs.sh

42 lines
1.1 KiB
Bash
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

#!/bin/bash
mkdir results
# Question 1
soft/bowtie2 --end-to-end --fast -x databases/all_genome.fasta -1 EchE_R1.fastq.gz -2 EchE_R2.fastq.gz -S results/alignment.sam
# Question 2
# a
samtools view -b results/alignment.sam
# b
samtools sort -@ 4 results/alignment.bam -o results/alignment.sorted.bam
# c
samtools index results/alignment.sorted.bam
# d
samtools idxstats -@ 4 results/alignment.sorted.bam > results/alignment.idx
# f
grep ">" databases/all_genome.fasta|cut -f 2 -d ">" > results/association.tsv
# Question 3
soft/megahit --k-list 21 --mem-flag 0 -1 EchE_R1.fastq.gz -2 EchE_R2.fastq.gz -o contigs
# Question 4
soft/prodigal -i contigs/final.contigs.fa -d results/genes.fna
# Question 5
sed "s:>:*\n>:g" results/genes.fna | sed -n "/partial=00/,/*/p"|grep -v "*" > results/genes_full.fna
# Question 6
blastn -query results/genes_full.fna -db databases/resfinder.fna -perc_identity 0.8 -qcov_hsp_perc 0.8 -evalue 1e-3 -outfmt 6 -out results/annoted_genes.dat
# Les génomes présentent de nombreux gènes de résistances à des antibiotiques : catB7, floR, tet(A)....