<commit_before>#!/bin/sh -x
# -*- mode: sh; -*-
# $Header$

# Silly script to dump the ENS[P,G] to swissprot/trembl accno mappings from an
# ensembl database. Used by gene-descriptions.pl

mysql=mysql

outname=ens-sptr-mapping
outfile=`pwd`/$outname.dat
logfile=$outname.log

Usage="Usage: $0 -h host -u user database; produces files $outname.{dat,log}";

if [ $# -le 1 ]; then
    echo $#
    echo $Usage >&2
    exit 2
fi

(cat <<EOF
SELECT tsc.translation_id, tsc.gene_id, xdb.db_name, x.dbprimary_id
FROM transcript tsc, 
     objectXref ox,
     Xref x,
     externalDB xdb
WHERE tsc.translation_id = ox.ensembl_id 
  AND ox.xrefId = x.xrefId
  AND x.externalDBId = xdb.externalDBId
  AND xdb.db_name in ('SWISS-PROT', 'SPTREMBL')
order by tsc.gene_id asc, xdb.db_name desc, x.dbprimary_id asc
into outfile '$outfile'<commit_msg>Changing the select query to get %query and %target. This  script is now deprecated. It has been integrated in gene-descriptions.pl<commit_after>#!/bin/sh -x
# -*- mode: sh; -*-
# $Header$

# Silly script to dump the ENS[P,G] to swissprot/trembl accno mappings from an
# ensembl database. Used by gene-descriptions.pl

mysql=mysql

outname=ens-sptr-mapping
outfile=`pwd`/$outname.dat
logfile=$outname.log

Usage="Usage: $0 -h host -u user database; produces files $outname.{dat,log}";

echo "\n*** This script is deprecated. It has been integrated in gene-descriptions.pl ***\n";

if [ $# -le 1 ]; then
    echo $#
    echo $Usage >&2
    exit 2
fi

(cat <<EOF
SELECT tsc.translation_id, tsc.gene_id, xdb.db_name, x.dbprimary_id, ix.query_identity, ix.target_identity
FROM transcript tsc, 
     objectXref ox,
     Xref x,
     externalDB xdb,
     identityXref ix
WHERE tsc.translation_id = ox.ensembl_id 
  AND ox.xrefId = x.xrefId
  AND x.externalDBId = xdb.externalDBId
  AND xdb.db_name in ('SWISSPROT', 'SPTREMBL')
  AND ox.objectxrefId = ix.objectxrefId
order by tsc.gene_id asc, xdb.db_name desc, x.dbprimary_id asc
into outfile '$outfile'
{'fraction_non_alphanumeric': 0.12064613831398284, 'fraction_numerical': 0.004038364462392731, 'mean_word_length': 3.78743961352657, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3365559', 'n_tokens_mistral': 777, 'n_tokens_neox': 742, 'n_words': 214}