BIMSBbioinfo / pigx_sars-cov-2

PiGx SARS-CoV-2 wastewater sequencing pipeline
GNU General Public License v3.0
18 stars 3 forks source link

ivar_primer_trim rule: calculate 80% of length for trimming #99

Open rcuadrat opened 2 years ago

rcuadrat commented 2 years ago

Currently, we have the option -m 180 which means we are removing reads < 180bp. This value should not be hardcoded because we want to allow for different read lengths. I suggest we compute read length automatically as suggested on issue #52 and specify some percentage of the length (for example 80%).

jonasfreimuth commented 2 years ago

For the moment it is not computed from read lengths, but possible to set it from the settings file...

jonasfreimuth commented 2 years ago

Also I don't see how iVar allows setting percentages for read-length. Either we would have to process every read individually (involving a lot of overhead, I can't see how this would be feasible without splitting each bam file into separate files for each read), or we could calculate the average read length and calculate the absolute value that is AvgReadLen * PercentReadLen... The average read length migh even already by calculated by one of the QC tools...