feat(crispr): implement CRISPR-Cas detection and fusion analysis module
This commit is contained in:
@@ -498,6 +498,11 @@ def main():
|
||||
ap.add_argument("--summary_md", type=Path, default=None, help="Write a Markdown report to this path")
|
||||
ap.add_argument("--report_mode", type=str, choices=["summary", "paper"], default="paper", help="Report template style")
|
||||
ap.add_argument("--lang", type=str, choices=["zh", "en"], default="zh", help="Report language")
|
||||
|
||||
# CRISPR Integration
|
||||
ap.add_argument("--crispr_results", type=Path, default=None, help="Path to CRISPR detection results JSON")
|
||||
ap.add_argument("--crispr_fusion", action="store_true", help="Visualize CRISPR-Toxin fusion events")
|
||||
|
||||
args = ap.parse_args()
|
||||
|
||||
args.out_dir.mkdir(parents=True, exist_ok=True)
|
||||
@@ -513,6 +518,17 @@ def main():
|
||||
plot_per_hit_for_strain(args.toxin_support, args.per_hit_strain, out2, args.cmap, args.vmin, args.vmax, args.figsize, args.merge_unresolved)
|
||||
print(f"Saved: {out2}")
|
||||
|
||||
# Load CRISPR data if available
|
||||
crispr_data = None
|
||||
if args.crispr_results and args.crispr_results.exists():
|
||||
try:
|
||||
with open(args.crispr_results) as f:
|
||||
crispr_data = json.load(f)
|
||||
# Future: Generate CRISPR specific plots here
|
||||
print(f"[Plot] Loaded CRISPR data: {len(crispr_data.get('arrays', []))} arrays found")
|
||||
except Exception as e:
|
||||
print(f"[Plot] Failed to load CRISPR results: {e}")
|
||||
|
||||
# Optional species heatmap
|
||||
species_png: Optional[Path] = None
|
||||
if args.species_scores and args.species_scores.exists():
|
||||
|
||||
Reference in New Issue
Block a user