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

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

No files matched your search

+10
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)