valenlab / amplican

9 stars 4 forks source link

ignoring substitution option #15

Open yinshiyi opened 1 year ago

yinshiyi commented 1 year ago

I have a specific need to ignore substitution only events. If a read have indel + substitution, I will count it as edited. If a read have indel, I will count it as editted. But if it only have substitution in the quantification window, I will not count it. Do you have any suggestion on how to implement this function in amplican? Thank you

yinshiyi commented 1 year ago

I am going to mess around with events_filtered_shifted_normalized.csv

yinshiyi commented 1 year ago
awk -F',' 'NR==1 || $8=="mismatch"' ${output}/alignments/events_filtered_shifted_normalized.csv \
> ${output}/alignments/events_filtered_shifted_normalized_filtered.csv

after I filtered out all the events that are not mismatch

alignments<-read.csv(paste0(results_folder,"alignments/events_filtered_shifted_normalized_filtered.csv"))
# rerun the summarize function
amplicanSummarize(alignments[alignments$consensus & alignments$overlaps, ],read.csv(config))%>%select(ID,Reads_Edited)

I got all zeros in reads_edited I think that the defaults pipeline does not consider mismatch as edits