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

Adding track marks to chromosomes #36

Open
jamonterotena opened this issue Dec 11, 2024 · 0 comments
Open

Adding track marks to chromosomes #36

jamonterotena opened this issue Dec 11, 2024 · 0 comments

Comments

@jamonterotena
Copy link

I would like to add tracks marking the chromosome coordinates on each chromosome rectangle. It should look somehow like here, but preferably with more ticks and less numbers.

This is my graph so far:

circos (2).pdf

I used the following code to generate the chromosomes:

%%capture
# Chromosome length (chromosome)
with open(chromosome_file) as f:
    f.readline()  # Skips the header line
    for line in f:
        line = line.rstrip().split(",")  # Split the line into name, start, and end
        name = line[0][3:]  # Remove 'chr' from the chromosome name
        length = int(line[-1])  # The last value is the chromosome length
        arc = Garc(
            arc_id=name,
            size=length,
            interspace=4,
            raxis_range=axis_ranges[1],
            labelposition=60, label_visible=True, labelsize=12,
            facecolor="#d3d3d3" #light gray
        )
        circle.add_garc(arc)  # Add the arc to the circle plot
circle.set_garcs()

Any help will be highly appreciated!

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

1 participant