<commit_before>#!/usr/bin/python3
# A program for finding fasta files that contain single-copy orthologs from at least 85% of the species in question
# USAGE: ./Parsing_orthogroups_TA.py
# Author: <NAME>
# Affiliation: University of New Hampshire, Durham, NH, USA
# Date: 11/22/2015
# Purpose is parse through fasta files to find 85% or more completed orthogroups

import os
import shutil
import sys

good_files = []

# CREATE YOUR OWN SPECIES LOOKUP LIST USING THE FILE NAMES OR THE SpeciesIDs.txt by Orthofinder
lookup_species = ['Acre_chry',  'Ceph_frag',  'Fusa_gram',  'Neur_cras',  'Stan_gris',
'Agar_hyph',  'Cera_plat',  'Fusa_sola',  'Pucc_gram',  'Tala_acul',
'Alte_bras',  'Chae_glob',  'geos_flav',  'Pyro_conf',  'Tric_rees',
'Aspe_flav',  'Coch_sati',  'geos_morb',  'Rasa_byss',  'Tric_vire',
'Baud_comp',  'Cord_mili',  'geos_putt', 'Usti_mayd', 'Botr_cine',  
'Cucu_berb',  'Gros_clav',  'Rhiz_eric',  'Usti_vire', 'Byss_circ',  
'Eutl_lata',  'Myro_inun',  'Sacc_cere',  'Zymo_trit']

# CHANGE THIS PATH TO YOUR ALIGNMENTS PATH
for root, dirs, files in os.walk("/fungi/taruna/shared/genomes4orthofinder4PAML/expanded_pep/Results_Feb11/Alignments/"):
    # orig_file_num = len(files)
    for currentFile in files:
        keep_file = True # assume file is good at the start
        species_list = []
# CHANGE THIS PATH TO YOUR ALIGNMENTS PATH
        working_file = open("/fungi/taruna/shared/genomes4orthofinder4PAML/expanded_pep/Results_Feb11/Alignments/" + currentFile, "r")
        for currentLine in working_file:
            currentLine = currentLine.rstrip()
            if currentLine.startswith(">"):
                for species in lookup_species:<commit_msg>adding contact info to parsing script<commit_after>#!/usr/bin/python3
# A program for finding fasta files that contain single-copy orthologs from at least 85% of the species in question
# USAGE: ./Parsing_orthogroups_TA.py
# Author: <NAME>
# Contact: <EMAIL>
# Affiliation: University of New Hampshire, Durham, NH, USA
# Date: 11/22/2015
# Purpose is parse through fasta files to find 85% or more completed orthogroups

import os
import shutil
import sys

good_files = []

# CREATE YOUR OWN SPECIES LOOKUP LIST USING THE FILE NAMES OR THE SpeciesIDs.txt by Orthofinder
lookup_species = ['Acre_chry',  'Ceph_frag',  'Fusa_gram',  'Neur_cras',  'Stan_gris',
'Agar_hyph',  'Cera_plat',  'Fusa_sola',  'Pucc_gram',  'Tala_acul',
'Alte_bras',  'Chae_glob',  'geos_flav',  'Pyro_conf',  'Tric_rees',
'Aspe_flav',  'Coch_sati',  'geos_morb',  'Rasa_byss',  'Tric_vire',
'Baud_comp',  'Cord_mili',  'geos_putt', 'Usti_mayd', 'Botr_cine',  
'Cucu_berb',  'Gros_clav',  'Rhiz_eric',  'Usti_vire', 'Byss_circ',  
'Eutl_lata',  'Myro_inun',  'Sacc_cere',  'Zymo_trit']

# CHANGE THIS PATH TO YOUR ALIGNMENTS PATH
for root, dirs, files in os.walk("/fungi/taruna/shared/genomes4orthofinder4PAML/expanded_pep/Results_Feb11/Alignments/"):
    # orig_file_num = len(files)
    for currentFile in files:
        keep_file = True # assume file is good at the start
        species_list = []
# CHANGE THIS PATH TO YOUR ALIGNMENTS PATH
        working_file = open("/fungi/taruna/shared/genomes4orthofinder4PAML/expanded_pep/Results_Feb11/Alignments/" + currentFile, "r")
        for currentLine in working_file:
            currentLine = currentLine.rstrip()
            if currentLine.startswith(">"):
                for species in lookup_species:
{'fraction_non_alphanumeric': 0.11719894520949312, 'fraction_numerical': 0.012305889246996778, 'mean_word_length': 4.309486780715397, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, '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': '7477725', 'n_tokens_mistral': 1355, 'n_tokens_neox': 1271, 'n_words': 318}