Get pctid and ANI using sequencing data downloaded from RefSeq
Download the table of all bacteria assemblies from RefSeq: https://ftp.ncbi.nlm.nih.gov/genomes/refseq/bacteria/assembly_summary.txt
After downloading assembly_summary.txt, remove the first line, and delete the “# “ from the beginning of the header. Use Kyle's script (scripts/refseq_assemblies.Rmd) to create accession_ftp_path.tsv (accession, ftp path to rna fasta, and the subfolder that contains the file) and unique_subfolders.tsv (the list of unique subfolders)
Set up a root directory (say /scr1/users/leej39/RefSeq_rna_200k). Use script/download_rna_fna.bash to download rna fasta files to respective subfolder. About 200K files are to be downloaded, so it is recommended to use multiple subfolders to store files.
Create a conda environment (say genomeComp, using environment.yml), under which you can use pyani and okfasta (https://github.com/kylebittinger/okfasta):
conda env create -f environment.yml
Edit config.yml appropriately (root directory, admin email, paths to unique_subfolders.tsv and run_okfasta.bash) and run the snakemake pipeline (e.g. run_snakemake.bash config.yml). This will
- copy
*_rna_from_genome.fna.gzfiles to the folderunzipped_rna_fna(for safety), - unzip
*_rna_from_genome.fna.gzfiles in the folderunzipped_rna_fna, - run
okfastato extract 16S region and save the result in the folder16S_fnaunder the root directory as*_16S.fna, and - combine all
*_16S.fnafiles into a single fileall_16S.faunder the root directory.
To be continued...