Script for the normalization of relative abundance out of DIAMOND default output (BLOSUM62 matrix) through a formula that relies on the 16S marker gene.
Start from the test case.
The code calculates the normalized count for each gene accession number.
Note that one gene name is typically associated to more than one gene accession number.
The aim is to sum the normalized count of rows that have the same gene name.
The test script refers to specific file names and specific sample names.
I would like to create a main script for a more general purpose, so that it can process different input files of the same type (from several samples for instance) at once.
Maybe by generalizing input file names through patterns?
Also, introducing for loops to process several tables from different samples into the same , single pivot table?
How about automatization: include flags to allow users to provide file names and sample names?
Once #4 will be closed, the main version of the 16S normalization script can be created.
The new script (provisional name: 16S_normalization.Rmd) is expected to calculate the normalization for all samples and report results in a pivot table.
The layout of the pivot table should be something like this: