I have a large worksheet with two main columns: 'cluster' and 'contig'.
cluster contig
S3C1 S3Ck127_685944
S3C1 S3Ck127_584669
S1C130 S1Ck127_453644
S1C130 S1Ck127_384284
S1C13 S1Ck127_564027
S1C13 S1Ck127_22091
S4C46 S4Ck127_728316
S4C46 S4Ck127_124356
S4C4 S4Ck127_404640
The names might be very similar (example, cluster S4C46 and S4C4 are different clusters).
Separately, I have a column/list which could be called 'clusters of interest'
clusters of interest
S3C1
S1C13
S4C46
What I would like to do is filter the original table, to keep only the 'clusters' which match the 'clusters of interest (and their associated 'contigs').
What I have tried for now: Based on Excel FILTER() function that includes a range of values , I have tried the following two formulas:
=FILTER(A2:B247514,COUNTIF(K2:K169,A2:A247514))
and
=FILTER(A2:B247514,1-ISNA(XMATCH(A2:A247514,K2:K169)))
(with A='cluster', B='contig', and K being 'contigs of interest')
The problem:
When I run UNIQUE on the output 'cluster' column, I get 96 results. My initial 'clusters of interest' list is 168 (double checked with UNIQUE). So it looks like I am missing quite a bit of data, but I'm not sure why. I would appreciate your help!