CoolFace
Apppublic

guohanghui/SPM

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
SPM_ranking.sh29 linesDownload Raw Back to scripts
1#!/bin/bash2 3#You can use this script to rank SequencePatternMatching.py results.4 5if [ $# -ne 1 ]6then7	echo "You should input correct parameters."8	echo "How to use..."9	echo "$0 search_results.txt"10else11	if [ ! -d peptidesearch ]12	then13		mkdir peptidesearch14	fi15	rank_basename=`ls $1 | awk -F '/' '{print $NF}' | awk -F '.txt' '{print $1}'`16	sed -n '2,$p' $1 > peptidesearch/peptidesearch.txt17	awk '{print $2}' peptidesearch/peptidesearch.txt > peptidesearch/peptidesearch_temp1.txt18    awk '{print $1,$3}' peptidesearch/peptidesearch.txt > peptidesearch/peptidesearch_temp2.txt19	if [ ! -d output ]20	then21		mkdir output22	fi23	paste peptidesearch/peptidesearch_temp1.txt peptidesearch/peptidesearch_temp2.txt |sort -n > output/${rank_basename}_ranked.txt24	echo "Done."25	echo "The ranking score is:"26	echo "output/${rank_basename}_ranked.txt"27	rm -r peptidesearch &> /dev/null28fi29