add the --min-sample-count option to obiclean.

This commit is contained in:
Eric Coissac
2025-02-24 08:48:31 +01:00
parent 51d11aa36d
commit 8671285d02
9 changed files with 43 additions and 23 deletions

View File

@ -196,6 +196,16 @@ func IsShorterOrEqualTo(length int) SequencePredicate {
return f
}
func OccurInAtleast(sample string, n int) SequencePredicate {
desc := MakeStatsOnDescription(sample)
f := func(sequence *BioSequence) bool {
stats := sequence.StatsOn(desc, "NA")
return len(stats) >= n
}
return f
}
func IsSequenceMatch(pattern string) SequencePredicate {
pat, err := regexp.Compile("(?i)" + pattern)