PoonLab / vindels

Developing an empirical model of sequence insertion and deletion in virus genomes
1 stars 0 forks source link

9_5_indel_rates.r: iTotal has no variable pat #101

Closed ArtPoon closed 2 years ago

ArtPoon commented 2 years ago
> iTotal$pat <- gsub("-.+$", "",iTotal$pat)
Error in `$<-.data.frame`(`*tmp*`, pat, value = character(0)) : 
  replacement has 0 rows, data has 5146000
> names(iTotal)
[1] "header"  "vloop"   "vlen"    "count"   "index"   "length"  "rtt.mid"
ArtPoon commented 2 years ago

pat (index 8) is missing because the corresponding column is removed by these lines: https://github.com/PoonLab/vindels/blob/03ac625896f931a6ea9c3a723c991a55e89310d2/2_within-host/9_5_indel_rates.r#L91-L92

ArtPoon commented 2 years ago

Commenting out the 8 in these lines resolved the issue