The workflow of FastD program
There are two parts in the FastD program, FastD-TR (Fast Detection of Target-site Resistance) to detect target-site insensitive mutations and FastD-MR (Fast Detection of Metabolic Resistance) to detect overexpressed detoxification genes.
The workflow of FastD-TR consists of five main steps: pre-processing, mapping, mutation allele extraction, mutation allele frequency calculation, and visualization (Figure 2 ). Raw reads from RNA-Seq data should be processed by FastQC and trimmomatic (Bolger, Lohse, & Usadel, 2014) to filter out reads with low sequencing quality. The obtained clean reads are then mapped to the target gene sequence using Bowtie2 (Langdon, 2015) with additional option, –no-unal (filter out unaligned reads), to generate a Sequence Alignment/Map (SAM) file (H. Li et al., 2009). The mapped reads which contain insertions or deletions are deleted or marked with “N” respectively by parsing the CIGAR string in the SAM file. According to the mutation position in target gene and reads POS tag, mutation allele codons were extracted from mapped reads by a Perl script. Then, all the mutation allele codons are translated to amino acid residues. The reads containing the mutant amino acid residues were treated as resistant reads. The mutation frequency can be estimated according to a formula (Després et al., 2014; D. Guo et al., 2017; Mackenzie-Impoinvil et al., 2019). An R script called ggseqlogo (Wagih, 2017) was used to visualize the allele distribution in all of the mutation loci.
\(Mutation\ frequency\ (\%)=\frac{\text{Number\ of\ resistant\ reads}}{\text{Number\ of\ all\ reads}\text{\ \ }\text{containing\ mutation\ loci}}\)× 100%
The workflow of FastD-MR consists of four main steps: pre-processing, mapping, read count calculation, and differential gene expression analysis (Figure 2 ). The pre-processing step of FastD-MR is the same as what is used for FastD-TR. The obtained clean reads are then mapped to the tested detoxification gene sequences using Bowtie2 with additional parameter, –no-unal, to generate a SAM file. Read counts per detoxification gene can be calculated by a Perl Script. To estimate the expression fold change, read counts per gene from different samples are processed by DESeq2 (Love, Huber, & Anders, 2014).