References: Protozoa - AndreaRP/METAGENOMICS GitHub Wiki

Protozoa

Create a directory named PROTOZOA_GENOME_REFERENCES/ and go inside it.

[Whole Genome] (ftp://ftp.ncbi.nlm.nih.gov/genomes/refseq/invertebrate/)

  1. Create a directory PROTOZOA_GENOME_REFERENCES/WG/ and go inside it.

  2. Download the assembly summary file, with a list of all the protozoa sequences included.

    curl 'ftp://ftp.ncbi.nlm.nih.gov/genomes/refseq/protozoa/assembly_summary.txt' > assembly_summary_protozoa.txt

  3. Get a list of complete and latest sequences.

    awk -F "\t" '{print $1,$20}' assembly_summary_protozoa.txt > ftpdirpaths_complete_latest.txt

  4. Download the fasta sequences.

    cat ftpdirpaths_complete_latest.txt | while read line; do dir=echo $line | cut -d " " -f 1 ;mkdir -p $dir;url=echo $line | cut -d " " -f 2;echo "wget -P $dir $url/*" ; done >> wget_all_protozoa.sh (creates download script)

    bash REFERENCES/PROTOZOO_GENOME_REFERENCE/WG/wget_all_protozoa.sh (executes download script)

    WARNING! This step will create a folder per genome and download several files into it, including nucleotide and protein sequences. Before executing this command please make sure you have sufficient storage space. We advise you create a new directory and execute this command from inside it, that will keep your working space well organized. In this example we have created the folder all_genomes for the download.

  5. Create the multifasta file with the genomic data.

    find REFERENCES/PROTOZOO_GENOME_REFERENCE/WG/all_genomes ! -name '*from_genomic.fna.gz' -name '*_genomic.fna.gz' -exec zcat {} \; > WG/protozoa_wg_all.fna

  6. Get length of each sequence

    samtools faidx REFERENCES/PROTOZOA_GENOME_REFERENCE/WG/protozoa_wg_all.fna (generates index: protozoa_wg_all.fna.fai)

    cut -f1-2 REFERENCES/PROTOZOA_GENOME_REFERENCE/WG/protozoa_wg_all.fna.fai > REFERENCES/PROTOZOA_GENOME_REFERENCE/WG/genome_length.txt

  7. Create Bowtie2 genome index

`bowtie2-build REFERENCES/PROTOZOA_GENOME_REFERENCE/WG/protozoa_wg_all.fna REFERENCES/PROTOZOA_GENOME_REFERENCE/WG/bwt2/protozoa_all`
  1. Create BLAST files - BLASTn
`makeblastdb -in REFERENCES/PROTOZOA_GENOME_REFERENCE/WG/protozoa_wg_all.fna -parse_seqids -dbtype nucl -out REFERENCES/PROTOZOA_GENOME_REFERENCE/BLAST/blastn/PROTOZOA_blastn`