ColabFold icon indicating copy to clipboard operation
ColabFold copied to clipboard

How to quickly extract iptm score, ptm score for ColabFold_Batch running alphafold multimer files?

Open yang-nei opened this issue 2 years ago • 4 comments

I'm executing ColabFold_batch for run multiple AlphaFold multimer. However, the number of models I run is too heavy to simply extract some data like pTM score or ipTM score. So my question is how to quickly iptm score, ptm score? I know that pLDDT score can be extraction by B-factor in pdb. so I am wondering whether there is a similar way to extract the two score I mention before.

yang-nei avatar Dec 28 '23 09:12 yang-nei

Hi, i have been working on something to help with this, it is still in development but give it a go! https://colab.research.google.com/drive/1j7WJLcUHTR8BrjkWDaU549rFk6X5Zu18 It pulls the rank_001 .json files from the results into a new folder and then creates a table with pTM and iPTM

ThomasCMcLean avatar Dec 28 '23 09:12 ThomasCMcLean

thank a lot! I'm considering whether this script can deal with multiple-json.-merged file. and extract pTM, ipTM score. So that I no longer need to tidy those file one by one.

yang-nei avatar Dec 28 '23 09:12 yang-nei

or I saw pTM score and ipTM appearing in log.txt, can I extract they by some script ?

yang-nei avatar Dec 28 '23 09:12 yang-nei

Hi, sorry if this answer is coming late. Using the next command line, go to the folder where all the json files are (the output folder of the colabfold batch), and type

for file in *.json; do
    filename=$(basename -- "$file")
    echo -n "$filename " >> output.txt && jq -r '.iptm' $file >> output.txt
done

if you need the ptm, just run it again, but change "iptm" for "ptm". The generated file, output.txt, will contain all the data.

mamunoz1 avatar Sep 11 '25 21:09 mamunoz1