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

gfatools view to subset a gfa file #33

Open
Dkyuan opened this issue Sep 21, 2023 · 2 comments
Open

gfatools view to subset a gfa file #33

Dkyuan opened this issue Sep 21, 2023 · 2 comments

Comments

@Dkyuan
Copy link

Dkyuan commented Sep 21, 2023

Hi, sir:

I wanted to subset a gfa file from a region (eg: Chr01:1-10000) , and I thought the parameter -R might help, but got a empty file, may your help me with the right code:
The code I used:

[path to]/gfa view -R Chr01:1-10000  -r 1 my.gfa >1_10k.gfa
 # I tried -r 1 , -r 10, or without -r
# I also tried -l Chr01:1-10000 with or without -r parameter

It output a empty file 1_10k.gfa

I used vg to construct the graph genome .vg, then got the gfa file.

the example code was successful:

./gfatools view -l MTh4502 -r 1 test/MT.gfa >test/sub.gfa

Thanks for your time.

@pioneer-pi
Copy link

I am also confused about -R option, each time I use it, I will get an empty file.
However, -l is useful. When I use ./gfatools view -l 1,2,3 my.gfa > subgraph.gfa, the result is segment 1,2,3 and related segments and links.

@Dkyuan
Copy link
Author

Dkyuan commented Dec 27, 2023

@pioneer-pi

Thanks for sharing. Yes, -l is useful as the example.

I use vg find to get a subset gfa file now:
vg find -x your.xg -p your_region -c 3 |vg view - > out.gfa

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