thegenemyers / FASTK

A fast K-mer counter for high-fidelity shotgun datasets
Other
112 stars 15 forks source link

Logex accept modimizer #5

Closed wheaton5 closed 3 years ago

wheaton5 commented 3 years ago

Hi Gene,

I wonder if it would be possible for Logex to accept a modimizer for the output? Like say Logex 'reduced=A%51==0' source<.ktab>? I would like to get modimized homozygous kmers to use alongside het kmer pairs.

Best, Haynes

thegenemyers commented 3 years ago

Yes possible but a bit of work as I have to go in and rework the already quite involved parser.

I would prefer a syntax like 'result=(A%101)[-3,6]' which would take all k-mers whose module 101 value is <=3 or =6. In otherwords, use the filter [] syntax to specify which mod values to accept.

% will be a quite expensive op as it requires a compute on each k-mer to get the modulo value. So referring to your other issue, we should look at how we want to analyze het-pairs.

wheaton5 commented 3 years ago

That syntax sounds good. I realize it would be expensive. This one is about a reduced set of hom kmers to analyze with the het pairs.