#!/bin/bash ## FASTAptamer Count will count the number of occurences of each unique sequence from a given input FASTA/FASTQ file and produce an output file of each unique sequence in descending order (highest abundance to lowest abundance). The Count output files are required as inputs for all other FASTAptamer programs. ## Will prepend a string to the identifiers of all sequences with information on the abundance of the corresponding sequence, in the following format: ">Rank-Reads-RPM" (Reads per Million) ## Because Count orders the sequences from highest to lowest abundance, can use the standard UNIX command "head" to easily see the most highly abundant sequences from any Count file. ## Requires installation of the FASTAptamer program, found here: https://burkelab.missouri.edu/fastaptamer.html ## FASTAptamer Publication: https://doi.org/10.1038%2Fmtna.2015.4 ## FASTAptamer Count Variables fastapt_dir=/full/path/to/dir ## Directory where FASTAptamer Perl Scripts are located. count_input_path=full/path/to/file.fasta ## Input File. count_output_path=/full/path/to/file.count.fasta ## Output File for FASTAptamer Count. perl "$fastapt_dir/fastaptamer_count" -i "$count_input_path" -o "$count_output_path"