pangenome / odgi

Optimized Dynamic Genome/Graph Implementation: understanding pangenome graphs
https://doi.org/10.1093/bioinformatics/btac308
MIT License
196 stars 40 forks source link

`odgi paths`: private/core/accessory sequence classification #565

Closed AndreaGuarracino closed 8 months ago

AndreaGuarracino commented 8 months ago

Node classification by coverage:

odgi paths -i test/chr6.C4.gfa --coverage-levels 2,50,90 | sort -k 1,1n | head | column -t
  #node.id  node.len  class
  1         816       c>=90
  2         1         c<2
  3         1         50<=c<90
  4         125       c>=90
  5         1         c<2
  6         1         50<=c<90
  7         122       c>=90
  8         1         c<2
  9         1         50<=c<90

# classes
odgi paths -i test/chr6.C4.gfa --coverage-levels 2,50,90 | grep '^#' -v | cut -f 3 | sort -r | uniq -c
  795 c>=90
  478 50<=c<90
  320 2<=c<50
  155 c<2

Path range classification by fraction:

odgi paths -i test/chr6.C4.gfa --fraction-levels 0.1,0.5,1.0 --path-range-class | head | column -t   
  #path.name                    start  end   class
  chm13#chr6:31825251-31908851  0      816   f>=1
  chm13#chr6:31825251-31908851  816    817   0.5<=f<1
  chm13#chr6:31825251-31908851  817    942   f>=1
  chm13#chr6:31825251-31908851  942    943   0.5<=f<1
  chm13#chr6:31825251-31908851  943    1065  f>=1
  chm13#chr6:31825251-31908851  1065   1066  0.5<=f<1
  chm13#chr6:31825251-31908851  1066   1547  f>=1
  chm13#chr6:31825251-31908851  1547   1548  0.5<=f<1
  chm13#chr6:31825251-31908851  1548   1566  f>=1

odgi paths -i test/chr6.C4.gfa --fraction-levels 0.1,0.5,1.0 --path-range-class --show-step-ranges | head | column -t   
  #path.name                    start  end   class     steps
  chm13#chr6:31825251-31908851  0      816   f>=1       1+
  chm13#chr6:31825251-31908851  816    817   0.5<=f<1   3+
  chm13#chr6:31825251-31908851  817    942   f>=1       4+
  chm13#chr6:31825251-31908851  942    943   0.5<=f<1   6+
  chm13#chr6:31825251-31908851  943    1065  f>=1       7+
  chm13#chr6:31825251-31908851  1065   1066  0.5<=f<1   9+
  chm13#chr6:31825251-31908851  1066   1547  f>=1       10+
  chm13#chr6:31825251-31908851  1547   1548  0.5<=f<1   12+
  chm13#chr6:31825251-31908851  1548   1566  f>=1       13+