<commit_before>#!/bin/bash

echo "downloading idmapping.dat from uniprot.org..."
wget ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/idmapping/by_organism/HUMAN_9606_idmapping.dat.gz

echo "extracting UniProt --> GeneID mapping..."
gunzip HUMAN_9606_idmapping.dat.gz
grep GeneID HUMAN_9606_idmapping.dat > uniprot_to_geneId.dat
awk '{print $3"\t"$1}' uniprot_to_geneId.dat | sort -n > uniprot_id_mapping.txt
#echo "found " `wc -l uniprot_id_mapping.txt` " mappings for " `cut -f 1 uniprot_id_mapping.txt | sort -u | wc -l` " entrez gene ids"

echo "copying to ../sample_data/genes/uniprot_id_mapping.txt..."
cp uniprot_id_mapping.txt ../sample_data/genes/

echo "done."<commit_msg>Script now downloads & processes uniprot data  in /tmp.  It also cleans up afteritself when complete.<commit_after>#!/bin/bash

echo "downloading idmapping.dat from uniprot.org..."
wget -P /tmp/ ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/idmapping/by_organism/HUMAN_9606_idmapping.dat.gz

echo "extracting UniProt --> GeneID mapping..."
gunzip /tmp/HUMAN_9606_idmapping.dat.gz
grep GeneID /tmp/HUMAN_9606_idmapping.dat > /tmp/uniprot_to_geneId.dat
awk '{print $3"\t"$1}' /tmp/uniprot_to_geneId.dat | sort -n > /tmp/uniprot_id_mapping.txt
#echo "found " `wc -l uniprot_id_mapping.txt` " mappings for " `cut -f 1 uniprot_id_mapping.txt | sort -u | wc -l` " entrez gene ids"

echo "copying to ../sample_data/genes/uniprot_id_mapping.txt..."
cp /tmp/uniprot_id_mapping.txt ../sample_data/genes/

echo "cleaning up /tmp..."
rm -f /tmp/HUMAN_9606_idmapping.dat
rm -f /tmp/uniprot_to_geneId.dat
rm -f /tmp/uniprot_id_mapping.txt

echo "done."
{'fraction_non_alphanumeric': 0.13560334528076465, 'fraction_numerical': 0.02031063321385902, 'mean_word_length': 4.368589743589744, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1677847', 'n_tokens_mistral': 703, 'n_tokens_neox': 657, 'n_words': 134}