<commit_before>#!/bin/python
# -*- coding: utf-8 -*-
###############################################
import os
import sys
import subprocess
import re
import time
from ClassVCF_creator import *
#############################################################################################
#Function_________________________________________________________________________________________________________
#INDEX_____________________________________________________________________________________________________________
#      InitVariant(line1,line2):"""Initialization of the variant by taking into accoutn its type"""
#      MappingTreatement(variant_object,vcf_field_object,nbGeno):
#      UnmappingTreatement(variant_object,vcf_field_object,nbGeno,seq1,seq2):"""Fills VCFfile in ghost mode (from a fasta file)"""
#      Counting(fileToRead)
#      AddPosition(position,setPositions,delta)
#      CheckAtDistanceXBestHits(upper_path,lower_path):"""Prediction validation : check if the couple is validated with only one mapping position """
#      PrintVCFHeader(VCF,listName,fileName,boolmyname):    
#############################################################################################
def InitVariant(line1,line2):
        """Initialization of the variant by taking into accoutn its type"""
        #Object Creation
        if "SNP" in line1 and "nb_pol_1" in line1:
                variant_object=SNP(line1,line2)
        elif "P_2" in line1:
                variant_object=SNPSCLOSE(line1,line2)
        elif "INDEL" in line1:
                variant_object=INDEL(line1,line2)
        else :
                print "!!!!Undefined Variant!!!!"
                return 1                
                        
        #VCF object Creation and filling variant's attribut   
        vcf_field_object=VCFFIELD()
        variant_object.FillInformationFromHeader(vcf_field_object)
        return (variant_object, vcf_field_object)   
        
#############################################################################################
#############################################################################################
def MappingTreatement(variant_object,vcf_field_object,nbGeno):
        """Treatement of the mapping informations and filling of the vcf object """
        table = [0] * 10 #Creates a 10 cols array
        #Fills information of the variant object with the informations of the discosnp++ header
        variant_object.GetPolymorphismFromHeader() <commit_msg>bug correction<commit_after>#!/bin/python
# -*- coding: utf-8 -*-
###############################################
import os
import sys
import subprocess
import re
import time
from ClassVCF_creator import *
#############################################################################################
#Function_________________________________________________________________________________________________________
#INDEX_____________________________________________________________________________________________________________
#      InitVariant(line1,line2):"""Initialization of the variant by taking into accoutn its type"""
#      MappingTreatement(variant_object,vcf_field_object,nbGeno):
#      UnmappingTreatement(variant_object,vcf_field_object,nbGeno,seq1,seq2):"""Fills VCFfile in ghost mode (from a fasta file)"""
#      Counting(fileToRead)
#      AddPosition(position,setPositions,delta)
#      CheckAtDistanceXBestHits(upper_path,lower_path):"""Prediction validation : check if the couple is validated with only one mapping position """
#      PrintVCFHeader(VCF,listName,fileName,boolmyname):    
#############################################################################################
def InitVariant(line1,line2):
        """Initialization of the variant by taking into accoutn its type"""
        #Object Creation
        if "SNP" in line1 and "nb_pol_1" in line1:
                variant_object=SNP(line1,line2)
        elif "SNP" in line1 and "nb_pol_1" not in line1:
                variant_object=SNPSCLOSE(line1,line2)
        elif "INDEL" in line1:
                variant_object=INDEL(line1,line2)
        else :
                print "!!!!Undefined Variant!!!!"
                return 1                
                        
        #VCF object Creation and filling variant's attribut   
        vcf_field_object=VCFFIELD()
        variant_object.FillInformationFromHeader(vcf_field_object)
        return (variant_object, vcf_field_object)   
        
#############################################################################################
#############################################################################################
def MappingTreatement(variant_object,vcf_field_object,nbGeno):
        """Treatement of the mapping informations and filling of the vcf object """
        table = [0] * 10 #Creates a 10 cols array
        #Fills information of the variant object with the informations of the discosnp++ header
        variant_object.GetPolymorphismFromHeader() 
{'fraction_non_alphanumeric': 0.23010967098703888, 'fraction_numerical': 0.010169491525423728, 'mean_word_length': 4.4344528710725895, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2213196', 'n_tokens_mistral': 1214, 'n_tokens_neox': 1136, 'n_words': 286}