بنقرة واحدة
debugging-patterns
Structured debugging framework for kreview data pipeline issues
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Structured debugging framework for kreview data pipeline issues
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | debugging-patterns |
| description | Structured debugging framework for kreview data pipeline issues |
Symptom: load_feature_cohort() returns 0 rows
Causes:
sample_ids filter.FSC.gene.parquet vs .fsc.gene.parquet)Debug:
import glob as g
print(len(g.glob(f"{results_dir}/*/*.FSC.gene.parquet")))
Symptom: merged = features.merge(labels, on="SAMPLE_ID") drops samples
Causes:
sample_id column has different format (e.g., path prefix)SAMPLE_ID, features use sample_id (case mismatch)Debug:
print(features["sample_id"].iloc[:3])
print(labels["SAMPLE_ID"].iloc[:3])
shared = set(features["sample_id"]) & set(labels["SAMPLE_ID"])
print(f"Shared: {len(shared)} / features: {features['sample_id'].nunique()} / labels: {labels['SAMPLE_ID'].nunique()}")
Symptom: ValueError: Input contains NaN from LogisticRegression
Fix: Always add NaN handling before modeling:
df = df.dropna(subset=[feature_col])
log.warning("dropped_nan", n_dropped=original_len - len(df))
Symptom: ConversionException: Could not convert string to INT32
Cause: Parquet files from different samples have different schemas
Fix: Use union_by_name=true in read_parquet()
import structlog
log = structlog.get_logger()
# Good: structured key-value pairs
log.info("feature_loaded", feature="FSC.gene", n_samples=4021, n_rows=514688)
# Bad: f-string messages
log.info(f"Loaded FSC.gene with {n} samples") # ❌ not queryable
Testing conventions, patterns, and best practices for kreview. MANDATORY reading before adding or modifying tests.
nbdev cell directives, module export conventions, editing workflow, and testing patterns for notebook-first development. MANDATORY reading before editing any kreview Python module.
5-tier ctDNA labeling hierarchy with IMPACT tissue rescue, CH hotspot filtering, configurable VAF/variant thresholds, and continuous VAF regression stats.
How to parse cBioPortal MAF, SV, CNA, and clinical files for the labeling pipeline.
DuckDB glob scan patterns, connection management, and performance for kreview
cfDNA fragmentomics biology — what each feature measures and how to interpret it for ctDNA detection.