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

(doc inconsistency) Convert annotation to RowDiff<Multi-BRWT> #495

Open
shenwei356 opened this issue Jul 6, 2024 · 0 comments
Open

(doc inconsistency) Convert annotation to RowDiff<Multi-BRWT> #495

shenwei356 opened this issue Jul 6, 2024 · 0 comments

Comments

@shenwei356
Copy link

shenwei356 commented Jul 6, 2024

Hi, I'm playing with metagraph, while I found the doc might not be updated with the lastest metagraph version.

On my laptop, I tried to install via conda, but it failed due to htslib and libdeflate version conflict. (**11 July update: I succeed to install in the server**)
The following packages are incompatible
└─ metagraph 0.3.6  is not installable because there are no viable options
   ├─ metagraph 0.3.6 would require
   │  └─ htslib [>=1.16,<1.21.0a0 |>=1.17,<1.21.0a0 ] but there are no viable options
   │     ├─ htslib 1.20 would require
   │     │  └─ libdeflate >=1.20,<1.21.0a0 , which conflicts with any installable versions previously reported;
   │     ├─ htslib [1.17|1.18|1.19|1.19.1|1.20] would require
   │     │  └─ libdeflate >=1.18,<1.21.0a0 , which conflicts with any installable versions previously reported;
   │     └─ htslib [1.15.1|1.16|1.17] would require
   │        └─ libdeflate >=1.13,<1.21.0a0 , which conflicts with any installable versions previously reported;
   ├─ metagraph 0.3.6 would require
   │  └─ htslib >=1.15.1,<1.21.0a0  but there are no viable options
   │     ├─ htslib 1.20, which cannot be installed (as previously explained);
   │     ├─ htslib [1.17|1.18|1.19|1.19.1|1.20], which cannot be installed (as previously explained);
   │     ├─ htslib [1.15.1|1.16|1.17], which cannot be installed (as previously explained);
   │     └─ htslib 1.15.1 would require
   │        └─ libdeflate >=1.10,<1.21.0a0 , which conflicts with any installable versions previously reported;
   └─ metagraph 0.3.6 would require
      └─ htslib >=1.20,<1.21.0a0 , which cannot be installed (as previously explained)

So I installed it via docker, which is easy to install but not easy to use.

$ sudo docker pull ghcr.io/ratschlab/metagraph:master
master: Pulling from ratschlab/metagraph
560c024910be: Pull complete 
73741faf56e2: Pull complete 
9fef9ccec059: Pull complete 
9f7e509ed7b4: Pull complete 
f130c8f6aa01: Pull complete 
d6c08dbd5c81: Pull complete 
f75225651ddd: Pull complete 
6e8f1b987c4c: Pull complete 
Digest: sha256:e75184a4e4defc98466fd1c720261bd08c172f854ed27841b87b83e572279d6a
Status: Downloaded newer image for ghcr.io/ratschlab/metagraph:master
ghcr.io/ratschlab/metagraph:master

Here's the step of indexing, the input is 200 bacterial assemblies. Everything is OK, and I can align the index. BTW, I ran the alignment function with a 16S rRNA gene, it only returned one alignment even if setting it to return 1000 alignments, which is far less than expected.

## Index

    # Build the graph
    ls test200_/* \
        | sed 's/^/\/mnt\//' \
        | sudo docker run -i -v .:/mnt ghcr.io/ratschlab/metagraph:master build -v -p 16 -k 31 -o /mnt/graph


    # Index k-mer coordinates
    ls test200_/* \
        | sed 's/^/\/mnt\//' \
        | sudo docker run -i -v .:/mnt ghcr.io/ratschlab/metagraph:master \
            annotate -v -p 16 -i /mnt/graph.dbg --anno-filename --coordinates  -o /mnt/annotation

## align

    sudo docker run -i -v .:/mnt ghcr.io/ratschlab/metagraph:master \
        align -v -p 16 -i /mnt/graph.dbg -a /mnt/annotation.row.annodbg \
            --align-alternative-alignments 1000 \
            --align-min-seed-length 15 \
            /mnt/t.16S.fa > metagraph.txt

And I would like to query with coordinates, following the steps here: Convert annotation to RowDiff. The guide does not specify the output base, and metagraph reported usage error.

metagraph: /lib/x86_64-linux-gnu/libhts.so.3: no version information available (required by metagraph)
Usage: metagraph transform_anno -o <annotation-basename> [options] ANNOTATOR

So I added -o, and the 3 stages worked well.

    for s in 0 1 2; do
        find . -name "*.column.annodbg" \
            | sed 's/^/\/mnt\//' \
            | sudo docker run -i -v .:/mnt ghcr.io/ratschlab/metagraph:master \
                transform_anno -v -p 16 --anno-type row_diff --coordinates --row-diff-stage $s \
                    -o /mnt/annotation -i /mnt/graph.dbg
    done

But for the next step, which needs the input of *.row_diff.annodbg, I can't find them.

find . -name "*.row_diff.annodbg" | ...

Files:

annotation.column.annodbg         annotation.row_reduction  graph.dbg.anchors        graph.dbg.succ           t.16S.fa
annotation.column.annodbg.coords  db.lmi                    graph.dbg.pred           graph.dbg.succ_boundary  test200_
annotation.row.annodbg            doc.md                    graph.dbg.pred_boundary  xxx.txt
annotation.row_count              graph.dbg                 graph.dbg.rd_succ        metagraph.txt

So I guess the doc might need to be updated.

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