HiCUP
HiCUP copied to clipboard
Improve hicup2juicer
Dear HiCUP developers, I would like to add 2 options to the hicup2juicer converter:
--digestthis would allow to retrieve the fragment id instead of the dummy values 0 and 1. This was written using the code fromhic_filter.--usemidthis would allow to use as position in the output the middle of the fragment instead of the 5' end.
I don't know perl but I made some tests and it seems to work as expected:
$ Conversion/hicup2juicer tests/dataset1_2.hicup.bam
$ cp tests/dataset1_2.hicup.bam tests/dataset1_2.hicup_test2.bam
$ Conversion/hicup2juicer -digester tests/digester_file.txt tests/dataset1_2.hicup_test2.bam
$ cp tests/dataset1_2.hicup.bam tests/dataset1_2.hicup_test3.bam
$ Conversion/hicup2juicer -usemid -digest tests/digester_file.txt tests/dataset1_2.hicup_test3.bam
$ head tests/*er
==> tests/dataset1_2.hicup.bam.prejuicer <==
1 0 chr21 10012821 0 0 chr21 10045579 1 40 42
2 1 chr21 10054920 0 1 chr21 10338847 1 42 42
3 0 chr21 10355322 0 1 chr21 30747032 1 40 34
4 0 chr21 10497306 0 0 chr21 10507687 1 40 23
5 0 chr21 10508845 0 0 chr21 43190469 1 42 23
6 0 chr21 10592898 0 1 chr21 24334291 1 42 42
7 0 chr21 10595624 0 1 chr21 10651483 1 42 42
8 0 chr21 10595648 0 0 chr21 5258688 1 42 40
9 1 chr21 10691207 0 0 chr21 7926371 1 3 40
10 0 chr21 10709991 0 1 chr21 7918804 1 0 0
==> tests/dataset1_2.hicup_test2.bam.prejuicer <==
1 0 chr21 10012821 1013 0 chr21 10045579 1027 40 42
2 1 chr21 10054920 1029 1 chr21 10338847 1068 42 42
3 0 chr21 10355322 1073 1 chr21 30747032 7134 40 34
4 0 chr21 10497306 1118 0 chr21 10507687 1120 40 23
5 0 chr21 10508845 1121 0 chr21 43190469 10593 42 23
6 0 chr21 10592898 1148 1 chr21 24334291 5077 42 42
7 0 chr21 10595624 1148 1 chr21 10651483 1160 42 42
8 0 chr21 10595648 1148 0 chr21 5258688 52 42 40
9 1 chr21 10691207 1160 0 chr21 7926371 576 3 40
10 0 chr21 10709991 1160 1 chr21 7918804 576 0 0
==> tests/dataset1_2.hicup_test3.bam.prejuicer <==
1 0 chr21 10010683 1013 0 chr21 10042881 1027 40 42
2 1 chr21 10056032 1029 1 chr21 10339050 1068 42 42
3 0 chr21 10354653 1073 1 chr21 30741887 7134 40 34
4 0 chr21 10497019 1118 0 chr21 10502642 1120 40 23
5 0 chr21 10508400 1121 0 chr21 43190769 10593 42 23
6 0 chr21 10593347 1148 1 chr21 10696306 1160 42 42
7 0 chr21 10593347 1148 1 chr21 24327493 5077 42 42
8 0 chr21 10593347 1148 0 chr21 5257358 52 42 40
9 0 chr21 10696306 1160 1 chr21 7911559 576 0 0
10 1 chr21 10696306 1160 0 chr21 7911559 576 3 40
The inputs were taken from https://github.com/lldelisle/tools-lldelisle/tree/master/tools/fromHicupToJuicebox where I developped a python script more than 4 years ago when HiCUP was not on github and therefore it was more difficult to contribute. For me it make more sense to integrate it to HiCUP rather than developping my python script in parallel.
I hope you will appreciate my contribution.
Hi,
Just seen your pull request. I'll take a look next week.
Many thanks!
This is a great news. I look forward your review.
Hi, Just a kind message to say that I am still interested in your review.
Hi,
I'll definitely review it shortly - your contribution is very much appreciated! We are just finishing off a paper and then I'll sort this out (along with some other projects on-hold).
Many thanks once again.
Best, Steven
Hi,
Sorry for the delay. This seems to be working! Thanks.
Could I just ask a small favour. Would you mind creating a pull request to the hicup/devel branch instead and I'll merge into there (I typically only have the latest release in the master branch - although documentation changes are allowed).
Thanks very much for contributing to HiCUP.
Best, Steven
I merged devel into my branch but it looks like devel was behind master... Maybe you want to merge master in devel first so we better see the changes I propose.
Hi,
I've forked a branch named devel2 from Master. Would you be able to merge into devel2 and then I can merge everything together for the next release.
Thanks very much!
Steven
I think now it should be ok.
Thanks for the contribution! That code will make its way into the next update.
Hi @StevenWingett , Any idea when the update would be?
Hi,
You are correct, I had expected to have made changes to HiCUP by now. I'll make a new update next week that incorporates just your patch.
Many Thanks! Steven
Hi,
The new version has been released. Thanks for your help once again.
All the best, Steven
Thanks for the release