Skip to content

need new feature: subset cool file by chrom start and end to a new cool file #344

Answered by nvictus
seqyuan asked this question in Q&A
Discussion options

You must be logged in to vote

UPDATE: as @Phlya posted earlier, the cooltools rearrange command is now released and can be used to do this as well.

For a single intrachromosomal subset {chrom} or {chrom}:{start}-{end}, you can also accomplish this using:

$ cooler dump --join -r {chrom}:{start}-{end} {input_cool} | cooler load --format bg2 {chrom.sizes}:{binsize} - {output_cool}

Include -r2 to select an interchromosomal zone.

Replies: 4 comments 11 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by seqyuan
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
11 replies
@Phlya
Comment options

Phlya Mar 3, 2024
Maintainer

@LucasMcNU
Comment options

@LucasMcNU
Comment options

@Phlya
Comment options

Phlya Mar 3, 2024
Maintainer

@LucasMcNU
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #342 on September 12, 2023 14:30.