Spaces:
Running
Running
supercat666
commited on
Commit
•
ba0ca5b
1
Parent(s):
c29b4c5
fix
Browse files
cas9on.py
CHANGED
@@ -224,12 +224,14 @@ def create_bigwig(df, bigwig_path):
|
|
224 |
bw = pyBigWig.open(bigwig_path, "w")
|
225 |
bw.addHeader(header)
|
226 |
|
227 |
-
# Create
|
228 |
-
|
229 |
-
|
|
|
|
|
230 |
|
231 |
# Add entries to the BigWig file
|
232 |
-
bw.addEntries(
|
233 |
|
234 |
# Close the BigWig file
|
235 |
bw.close()
|
|
|
224 |
bw = pyBigWig.open(bigwig_path, "w")
|
225 |
bw.addHeader(header)
|
226 |
|
227 |
+
# Create separate lists for chromosomes, starts, ends, and values
|
228 |
+
chromosomes = df['Chr'].tolist()
|
229 |
+
starts = df['Start Pos'].tolist()
|
230 |
+
ends = df['End Pos'].tolist()
|
231 |
+
values = df['Prediction'].astype(float).tolist()
|
232 |
|
233 |
# Add entries to the BigWig file
|
234 |
+
bw.addEntries(chromosomes, starts, ends=ends, values=values)
|
235 |
|
236 |
# Close the BigWig file
|
237 |
bw.close()
|