<commit_before>#!/usr/bin/python

__author__ = "<EMAIL>"
__version__ = "PLACEHOLDER"
__date__ = "PLACEHOLDER"

import csv
import os, re
from collections import defaultdict
from urllib2 import urlopen

class CallSampleReader(object):
    '''
        CallSampleReader reads in a tab-delimited file of the sort used to represent 1000 Genomes 
        metadata relating sample IDs (of the sort present in the 1000G VCF files) to
        specific populations, super populations, and gender. It can then filter sample IDs.

        inFile can either be a local file path, or a url

        The input file is expected to have four columns, in any order, with a header described as follows:
        sample  pop super_pop   gender      
        
        An example row:
        HG00096 GBR EUR male

        A fill example input file can be found on the 1000G server:
        ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/release/20130502/integrated_call_samples_v3.20130502.ALL.panel
    '''
    def __init__(self, inFile):<commit_msg>fixed urllib import for py3<commit_after>#!/usr/bin/python

__author__ = "<EMAIL>"
__version__ = "PLACEHOLDER"
__date__ = "PLACEHOLDER"

import csv
import os, re
from collections import defaultdict
try:
    from urllib2 import urlopen
except ImportError: # for py3
    from urllib.request import urlopen

class CallSampleReader(object):
    '''
        CallSampleReader reads in a tab-delimited file of the sort used to represent 1000 Genomes 
        metadata relating sample IDs (of the sort present in the 1000G VCF files) to
        specific populations, super populations, and gender. It can then filter sample IDs.

        inFile can either be a local file path, or a url

        The input file is expected to have four columns, in any order, with a header described as follows:
        sample  pop super_pop   gender      
        
        An example row:
        HG00096 GBR EUR male

        A fill example input file can be found on the 1000G server:
        ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/release/20130502/integrated_call_samples_v3.20130502.ALL.panel
    '''
    def __init__(self, inFile):
{'fraction_non_alphanumeric': 0.058768656716417914, 'fraction_numerical': 0.03731343283582089, 'mean_word_length': 2.9575645756457565, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5692457', 'n_tokens_mistral': 688, 'n_tokens_neox': 597, 'n_words': 248}