Right now the paired counts are inner joined (the default behavior of merge).
|
finalDf = initialDf.merge( |
|
finalDf, on=["id", "gene"], suffixes=["_initial", "_final"] |
|
).rename( |
|
columns={ |
|
"id": "sgRNA", |
|
"gene": "Gene", |
|
"count_initial": sample + ".initial", |
|
"count_final": sample + ".final", |
|
} |
|
) |
|
finalDf.to_csv("count-" + sample + "-i.f.csv", index=False) |
However, the downstream analysis (i.e., MAGeCK mle) should be able to handle merging counts properly if we do a full (outer) join then impute with ones/1s.
Right now the paired counts are inner joined (the default behavior of
merge).crispr-screening/bin/extract-reads.py
Lines 75 to 85 in 1a6f8c1
However, the downstream analysis (i.e., MAGeCK mle) should be able to handle merging counts properly if we do a full (outer) join then impute with ones/1s.