GithubHelp home page GithubHelp logo

--db-output about foldseek HOT 6 CLOSED

steineggerlab avatar steineggerlab commented on June 10, 2024
--db-output

from foldseek.

Comments (6)

milot-mirdita avatar milot-mirdita commented on June 10, 2024

Do you want to make a subset of the target sequences that were hit by something, or do you want to make a subset of the query sequences that had some hits?

from foldseek.

sahakyanhk avatar sahakyanhk commented on June 10, 2024

A subset of the target sequences that were hit by something.

For instance, we run:
foldseek easy-search 1pdb.pdb pdb output.tsv tmp

How can I get a new foldseek database containing all hits from output.tsv. My goal is to run a new search in that subset using another query.

from foldseek.

milot-mirdita avatar milot-mirdita commented on June 10, 2024

You have to use the non-easy- workflows for this. Here is a suggestion how to do this search:

# replicate easy-search
foldseek createdb 1pdb.pdb querydb
foldseek search querydb pdb result tmp
foldseek convertalis querydb pdb result output.tsv 

# turn result database into a format where we can extract the database keys
foldseek prefixid result result.tsv --tsv
# print only the unique database keys into a file
cat result.tsv | awk '{ print $2 }'  | sort -u > target_keys.tsv
# generate subset of the target database
foldseek createsubdb target_keys.tsv pdb pdb_subset
foldseek createsubdb target_keys.tsv pdb_ss pdb_subset_ss

# search against the target subset
foldseek search other_query_db pdb_subset result_2 tmp
foldseek convertalis other_query_db pdb_subset result_2 output_2.tsv

Keep in mind that the 3Di+AA E-value depends on the target database size, thus you will have possibly unrealistic low E-values when you search against the subset. You can output the TM-score in convertalis by adding alntmscore to --format-output. E.g. --format-output query,target,fident,alnlen,mismatch,gapopen,qstart,qend,tstart,tend,evalue,bits,alntmscore. TM-score is independent from the target database size.

from foldseek.

sahakyanhk avatar sahakyanhk commented on June 10, 2024

Thanks, Milot. I tried to reproduce what you suggested but got some problems. The generated pdb_subset does not have pdb_subset_ss* files, and the search fails with the "Input pdb_subset_ss does not exist" error. Also, I am wondering why we need

foldseek convertalis querydb pdb output.tsv
and then
foldseek prefixid result result.tsv --tsv

Does not the first column of the result file contains the same database keys?

Besides, foldseek convertalis requires at least 4 input paths, so foldseek convertalis querydb pdb output.tsv does not work. I guess it should be foldseek convertalis querydb pdb result output.tsv, though in the foldseek help examples, also only 3 paths provided.

from foldseek.

milot-mirdita avatar milot-mirdita commented on June 10, 2024

Sorry, I wrote the commands down without actually trying them. I fixed them now.

You can leave out the first convertalis if you don't care about the first searches m8 output.

We need to do a pretty roundabout way of doing this procedure for two reasons. We could just extract the second column (the target accession) from convertalis and give that to createsubdb --id-mode 1. But there is no actual guarantee that these are unique. With this procedure we can extract the internal database key and use that to create the subset. Aditionally, we would ideally do everything with convertalis --format-output instead but qkey and dbkey are not exposed there. I'll add something to expose these two fields when I have time.

from foldseek.

sahakyanhk avatar sahakyanhk commented on June 10, 2024

Thanks, it works. Looking forward to testing new options!

from foldseek.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.