References: Fungi - AndreaRP/METAGENOMICS GitHub Wiki

Fungi

Create a directory named FUNGI_GENOME_REFERENCES/ and go inside it.

[ITS] (ftp://ftp.ncbi.nlm.nih.gov/genomes/TARGET/ITS_rRNA/Fungi/)

  1. Create a directory FUNGI_GENOME_REFERENCES/ITS/ and go inside it.

  2. Download the multifasta file.

    curl 'ftp://ftp.ncbi.nlm.nih.gov/genomes/TARGET/ITS_rRNA/Fungi/Fungi.all.fna.tgz' > fungi_all.fna.tgz

  3. Decompress.

    tar xvzf fungi_all.fna.tgz

  4. Create bowtie index files.

    bowtieIndex bowtie2-build /REFERENCES/FUNGI_GENOME_REFERENCE/ITS/fungi_all.fna REFERENCES/FUNGI_GENOME_REFERENCE/WG/bwt2/ITS_all

[Whole Genome] (ftp://ftp.ensemblgenomes.org/pub/fungi/release-31/fasta/)

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

  2. Download the fasta for each sequence. We download the toplevel files only (which are the best assembled).

    wget -P REFERENCES/FUNGI_GENOME_REFERENCE/ -r -np -A "*dna.toplevel.fa.gz" ftp://ftp.ensemblgenomes.org/pub/fungi/release-31/fasta/

    WARNING! This step will create a folder per genome and download several files into it. 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.

    If you were to peep at the fasta files we have downloaded you would see that the heading of the sequence is not useful to us, as it only contains the numeric ID given by [Ensembl] (http://fungi.ensembl.org/index.html). Fortunately, the directories are named after each species, so we can use the following code to include the species name into the corresponding sequence of the multifasta:

    for f in "REFERENCES/FUNGI_GENOME_REFERENCE/all_genomes/*/dna/*dna.toplevel.fa.gz" do spName=$(echo $f | rev | cut -d'/' -f3 | rev) zcat "$f" | sed "s/>/>$spName|/g" done > REFERENCES/FUNGI_GENOME_REFERENCE/WG/fungi_all.fna

  3. Get length of each sequence

    samtools faidx REFERENCES/FUNGI_GENOME_REFERENCE/WG/fungi_all.fna (generates index: fungi_all.fna.fai)

    cut -f1-2 REFERENCES/FUNGI_GENOME_REFERENCE/WG/fungi_all.fna.fai > REFERENCES/FUNGI_GENOME_REFERENCE/WG/genome_length.txt

  4. Create Bowtie2 genome index

`bowtie2-build REFERENCES/FUNGI_GENOME_REFERENCE/WG/fungi_all.fna REFERENCES/FUNGI_GENOME_REFERENCE/WG/bwt2/fungi_all`
  1. Create BLAST files - BLASTn
`makeblastdb -in REFERENCES/FUNGI_GENOME_REFERENCE/WG/fungi_all.fna -parse_seqids -dbtype nucl -out /REFERENCES/VIRUS_GENOME_REFERENCE/BLAST/blastn/FUNGI_blastn`