Skip to content
Snippets Groups Projects
Commit 7028126e authored by nfontrod's avatar nfontrod
Browse files

src/download_encode_eclip/merge_eclip.py: modification of merge_files function...

src/download_encode_eclip/merge_eclip.py: modification of merge_files function to remove the heading chr in the first bed column
parent 01dcc3c6
Branches
No related tags found
No related merge requests found
......@@ -143,8 +143,8 @@ def merge_files(dfiles: Dict[str, List[Path]], target: str) -> None:
list_file = " ".join(map(str, dfiles[k]))
cmd = f"zcat {list_file} | sort -k1,1 -k2,2n > {tmp_out}"
cmd2 = f"bedtools merge -i {tmp_out} -s -c 4,5,6 " \
f"-o collapse,mean,distinct | cut -f1-3,5-7 | gzip -c " \
f"> {res_out}"
f"-o collapse,mean,distinct | cut -f1-3,5-7 | sed 's/^chr//g' " \
f"| gzip -c > {res_out}"
sp.check_output(cmd, shell=True)
sp.check_output(cmd2, shell=True)
tmp_out.unlink()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment