Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggestion for hicAggregate and hicAverage #633

Closed
fgualdr opened this issue Nov 18, 2020 · 8 comments
Closed

suggestion for hicAggregate and hicAverage #633

fgualdr opened this issue Nov 18, 2020 · 8 comments

Comments

@fgualdr
Copy link

fgualdr commented Nov 18, 2020

Hi,

for both functions would be really useful if strand informations stored in BED could be taken into account in order to make the aggregation and average strand aware. This would be extremely useful when for example plotting TSS to TES regions.

@LeilyR
Copy link
Collaborator

LeilyR commented Nov 18, 2020

for know I would suggest you to generate a TSS or TES bed file from your original bed file. (one base length rows)

@fgualdr
Copy link
Author

fgualdr commented Nov 18, 2020

thanks for the quick reply.
My point is to make the mean/median or sum aggregation in order to have all on the "+" strand by transposing the sub matrix of features in the BED which are on the minus strand... don't know if my point is clearer.

@LeilyR
Copy link
Collaborator

LeilyR commented Nov 18, 2020

I am not sure I understand you but why don't you make two bed files then , one with positive and the other with the negative strands, then run hicAggregate twice, once on each of them.

@fgualdr
Copy link
Author

fgualdr commented Nov 18, 2020

Thanks again,
yes that I could do. The point is if I then want to combine the two separate aggregations into one only by transposing the one obtained with "-" strand BED.
Thanks

@joachimwolff
Copy link
Collaborator

Hi @fgualdr,

sorry for the delayed reply. I have finally some time atm to fix bugs and implement new features. Can you explain to me what you mean with transposing the one obtained with "-" strand BED.?

Thanks a lot,

Joachim

@fgualdr
Copy link
Author

fgualdr commented Jul 13, 2021

Hi, thanks for the reply.
Maybe I explained myself wrongly.
What I was after was to generate aggregated/average strand aware so that the average contacts across all view point stored in the BED file could take into account the strands directly from the BED file.
In other wards to average the contacts after flipping those on the "-" strand.
I am doing this looking at contacts around TSSs and it would be nice to generate the plot so that the termination sites are all on the right hand side.
I know I can make two aggregation plot one for the "+" and one for the "-" but would be nice to have the tool out of the box dealing with the strand.

Thanks again for the nice tool.
Francesco

@joachimwolff
Copy link
Collaborator

Ah, I think I get what feature you want.

@joachimwolff
Copy link
Collaborator

joachimwolff commented Jul 13, 2021

I implemented it the following:

  • hicAggreagateContacts:

    • Strand + / +: as it used to be
    • Strand + / - : flip values left to right: [[1,2,3], [4,5,6]] becomes [[3,2,1],[6,5,4]]
    • Strand - / + : flip values up/down: [[1,2,3], [4,5,6]] becomes [[4,5,6],[1,2,3]]
    • Strand - / - : compute transpose: [[1,2,3], [4,5,6]] becomes [[6,5,4],[3,2,1]]
  • hicAverageRegions:

    • Strand + : as it used to be
    • Strand - : transpose

The changes are in the branch aggregate_average_strand_information. They can be activated with the parameter --considerStrandDirection. Would be great if you can give me feedback if it works as you intended.

Best,

Joachim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants