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

Visualise specific positions of a chromsome #499

Open
hzlnutspread opened this issue Apr 19, 2023 · 9 comments
Open

Visualise specific positions of a chromsome #499

hzlnutspread opened this issue Apr 19, 2023 · 9 comments

Comments

@hzlnutspread
Copy link

hzlnutspread commented Apr 19, 2023

Hi there, is there some way to drill down and get a closer look at specific regions of a chromosome? For example, if I wanted to look more closely at chromsome 3: 1000-100000 would this be possible using odgi?

For context I am using a full genome fasta file. grep ">" on that file gives me chr01-chr29.

Thanks very much

@subwaystation
Copy link
Member

@hzlnutspread
Copy link
Author

Thanks @subwaystation have been trying and playing around for a while.

I know that the particular location of the chromsome I would like to look at is between: 11,463,157 - 11,982,640 on chromosome 3 (length 519,483).

I do not know what the node ID is and I doubt it would be one singular node

How would you suggest I go about this?

I have tried
./odgi/odgi.sif odgi extract -i "${input_file}" -r 11463157-11982640 -c 1 -d 0 -o "${output_path}/ME02_hapA_chr3_${node_id}.og"

however the error says that the range can not be found.

Any idea of how I could do this?

@AndreaGuarracino
Copy link
Member

AndreaGuarracino commented May 4, 2023 via email

@hzlnutspread
Copy link
Author

Screen Shot 2023-05-04 at 2 32 39 PM

Thanks! That actually worked and there is no error. However, I am trying to do some analysis on this given sex locus on chromsome 3 as seen above. When I run that command I simply get a whole list of path ranges but no node IDs. Could you suggest a different set of command for me to run in order to visualise more in depth that particular range? Thanks very much!!

@subwaystation
Copy link
Member

Hi @hzlnutspread
Are you sure this is the extracted graph? Usually, path positions appear in the path name after the extraction.

If it is a complex locus, you may have to add -E or select larger values for -c or -d. That depends on the graph.
Maybe the trials in #478 shine more light on your problem?

@hzlnutspread
Copy link
Author

@subwaystation hi there! No this is not the extracted path. This is the full chromosome .og file that has been visualised. I am wanting to know if there is a standard/good way of extracting a portion of this graph or visualising the specific part in the middle of it where you can see gaps exist for some whereas for P8hap2A_chr3_Ragtag there is something there (assuming we know the exact positions of it)

Also, I wanted to ask how exactly the sorting algorithm works. It seems to do some funky stuff when applied to some of the genomes I've tested. It shouldn't happen to shift things around would it or truncate/remove parts of a genome/chromsome right?

@subwaystation
Copy link
Member

With the command line you mentioned above plus @AndreaGuarracino's suggestion, you should already be able to do so. Or was the tutorial not detailed enough? I agree that you graph is really messy, so sorting it first is the way to go. Which sorting algorithm did you apply? All the algorithm does is to re-arrange the nodes in 1D. That's it. It does not add or remove nodes, paths, steps, edges, ...

If it helps, you can send the graph to me and I can try to extract your region in question.

@hzlnutspread
Copy link
Author

@subwaystation hi there, how do I go about sending you the file?

@subwaystation
Copy link
Member

If possible, please send it to [email protected]. @hzlnutspread

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

3 participants