<commit_before>#!/bin/bash

# Script for downloading sheep genome and converting it into correct format for Chipster. 
# Please verify the filesize (SEE THE LAST COMMENT), wget/server seems to cut off files sometimes.

# download assembly report
wget ftp://ftp.ncbi.nlm.nih.gov/genomes/ASSEMBLY_REPORTS/All/GCF_000002315.3.assembly.txt

# keep only chromosome identifiers
cat GCF_000002315.3.assembly.txt |grep assembled-molecule |grep -v "MT" |cut -d "	" -f 3 > chrs.txt

# download sequence for each chromosome
while read chr; do
	wget "ftp://ftp.ncbi.nlm.nih.gov/genbank/genomes/Eukaryotes/vertebrates_other/Gallus_gallus/Gallus_gallus-4.0/Primary_Assembly/assembled_chromosomes/FASTA/chr$chr.fa.gz" -O "$chr.fa.gz"
	gunzip "$chr.fa.gz"
done < chrs.txt

# append all sequences together
cat *.fa > toplevel.fa

# clean headers
sed 's/>gi.*chromosome />/g' toplevel.fa | sed 's/, whole genome shotgun sequence//g' > toplevel-rename.fa

# remove empty rows
grep . toplevel-rename.fa > toplevel-clean.fa

# Result length should equal to "Total sequence length" minus "Total length" of "Unpaced scaffolds", in this case 2587507083
BYTES=$(grep -v ">" toplevel-clean.fa | wc -c); LINES=$(grep -v ">" toplevel-clean.fa | wc -l);expr $BYTES - $LINES
echo $BYTES

mv toplevel-clean.fa Ovis_aries.Oar_v3.1.dna.toplevel.fa<commit_msg>prepare new species for gb<commit_after>#!/bin/bash

# Script for downloading chicken genome and converting it into correct format for Chipster. 

# download assembly report
wget ftp://ftp.ncbi.nlm.nih.gov/genomes/ASSEMBLY_REPORTS/All/GCF_000002315.3.assembly.txt

# keep only chromosome identifiers
cat GCF_000002315.3.assembly.txt |grep assembled-molecule |grep -v "MT" |grep -v "linkage group"|cut -d "	" -f 3 > chrs.txt

# download sequence for each chromosome
while read chr; do
	wget "ftp://ftp.ncbi.nlm.nih.gov/genbank/genomes/Eukaryotes/vertebrates_other/Gallus_gallus/Gallus_gallus-4.0/Primary_Assembly/assembled_chromosomes/FASTA/chr$chr.fa.gz" -O "$chr.fa.gz"
	gunzip "$chr.fa.gz"
done < chrs.txt

# append all sequences together
cat *.fa > toplevel.fa

# clean headers
sed 's/>gi.*chromosome />/g' toplevel.fa | sed 's/, whole genome shotgun sequence//g' > toplevel-rename.fa

mv toplevel-rename.fa Gallus_gallus.4.0.fa

{'fraction_non_alphanumeric': 0.12356067316209035, 'fraction_numerical': 0.026572187776793623, 'mean_word_length': 4.365795724465558, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5563384', 'n_tokens_mistral': 922, 'n_tokens_neox': 811, 'n_words': 209}