mirror of
http://43.156.76.180:8026/YuuMJ/EukPhylo.git
synced 2025-12-27 16:30:24 +08:00
Changing CladeGrabbing.py to use less than or equal to for number of contaminants
This commit is contained in:
parent
d249add545
commit
fb6e7aa6e7
@ -158,7 +158,7 @@ def get_subtrees(args, file):
|
|||||||
|
|
||||||
|
|
||||||
#Grab a clade as a subtree if 1) it has enough target taxa; 2) it has enough "at least" taxa; 3) it does not have too many contaminants
|
#Grab a clade as a subtree if 1) it has enough target taxa; 2) it has enough "at least" taxa; 3) it does not have too many contaminants
|
||||||
if len(target_leaves) >= args.min_presence and len(required_taxa_leaves) >= args.required_taxa_num and ((args.contaminants < 1 and len(leaves) < args.contaminants * len(target_leaves)) or len(leaves) < args.contaminants):
|
if len(target_leaves) >= args.min_presence and len(required_taxa_leaves) >= args.required_taxa_num and ((args.contaminants < 1 and len(leaves) <= args.contaminants * len(target_leaves)) or len(leaves) <= args.contaminants):
|
||||||
selected_nodes.append(node)
|
selected_nodes.append(node)
|
||||||
seen_leaves.extend([leaf.name for leaf in node])
|
seen_leaves.extend([leaf.name for leaf in node])
|
||||||
#Write the subtrees to output .tre files
|
#Write the subtrees to output .tre files
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user