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

How to merge chain file from different chromosome #9

Closed
zhoudreames opened this issue Nov 16, 2022 · 2 comments
Closed

How to merge chain file from different chromosome #9

zhoudreames opened this issue Nov 16, 2022 · 2 comments

Comments

@zhoudreames
Copy link

I split the genome into 20 chromosomes and then ran nf-Lo with blat alignments for each chromosome. I don't know how to merge all chain files into one chain, can you help me ?

@RenzoTale88
Copy link
Contributor

@zhoudreames thank you for using nf-LO!
My suggestion is to run nf-LO on the whole genome at once and leave nf-LO to combine the data itself. nf-LO split the genome in fragments of different sizes and then combine.

Having said that, if you want to proceed with the individual chains you can combine the files using chainMergeSort and chainSplit in sequence:

chainMergeSort *.chains | chainSplit run stdin -lump=1 
mv run/000.chain ./merged.chain

Then generate the net file:

chainPreNet merged.chain source.sizes target.sizes stdout |
        chainNet -verbose=0 stdin source.sizes target.sizes netfile.net /dev/null 

And finally create the resulting liftover:

netChainSubset -verbose=0 netfile.net merged.chain stdout | chainStitchId stdin stdout > liftover.chain

Hope this helps

Andrea

@zhoudreames
Copy link
Author

Thank you for your Detailed description, I try it.

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

No branches or pull requests

2 participants