vgteam / vg

tools for working with genome variation graphs
https://biostars.org/tag/vg/
Other
1.13k stars 195 forks source link

vg paths returns no results and no error when using -S and -G together #4086

Open hui-liu opened 1 year ago

hui-liu commented 1 year ago

1. What were you trying to do? I am trying to use vg to extract the non-reference paths from the Minigraph-Cactus (version 2.6.7) pangenome.

I used the command

vg paths -S SDTS1 -L -G -x MC.gbz

2. What did you want to happen?

I was expecting the run to list the path names of non-reference samples.

3. What actually happened?

Nothing was printed on the screen.

4. If you got a line like Stack trace path: /somewhere/on/your/computer/stacktrace.txt, please copy-paste the contents of that file here:

Place stacktrace here.

5. What data and command can the vg dev team use to make the problem happen?

Here is the command I used to generate the MC pangenome.

cactus-pangenome \
${dir}/js \
${dir}/seqfile \
--workDir ${dir}/temp \
--reference SDTS1 SDTS2 \
--vcfReference SDTS1 SDTS2 \
--outDir ${dir}/MC \
--outName MC \
--mgCores 64 \
--mapCores 24 \
--consCores 64 \
--indexCores 64 \
--filter 2 \
--gbz clip filter full \
--gfa clip full \
--giraffe clip filter \
--vcf \
--odgi \
--viz \
--chrom-og \
--chrom-vg clip filter \
--logFile mc_SDTS.log

6. What does running vg version say?

version v1.50.1 "Monopoli"
glennhickey commented 1 year ago

Maybe try running

vg paths  -L -x MC.gbz

to get all the paths?

adamnovak commented 1 year ago

I think the problem is the -G option. It specifies that we want "generic" paths, which are the ones which aren't haplotypes or references, and which don't have sample names.

It should work without -G.

We really shouldn't let you use -S and -G together, since it can't possibly match anything.

hui-liu commented 1 year ago
vg paths  -L -x MC.gbz

Does It only work for the filtered graph?

Here is the command I tested:

$ vg paths -L -x MC.d2.gbz > aa
$ grep AH105 aa | head
AH#0#AH105#0
AH#0#AH105#24530
AH#0#AH105#25195
AH#0#AH105#28341
AH#0#AH105#33372
AH#0#AH105#35809
AH#0#AH105#39079
AH#0#AH105#39746
AH#0#AH105#44080
AH#0#AH105#44977

$ vg paths -L -x MC.full.gbz > bb
$ grep AH105 bb | head
AH#0#AH105#0

$ vg paths -L -x MC.gbz > cc
$ grep AH105 cc | head
AH#0#AH105#0