import pyslim, msprime
import numpy as np
import random
import time
import re
import ast
import sys
import os

found = re.search(r'TSR_files/.+_Gen',sys.argv[1])
seed = found[0][10:23]
print("seed = ",seed)

os.system("vcftools --vcf "+'results/SLiM_output/VCF_files/T1_'+str(seed)+'.vcf'+" --maf 0.01 --recode --recode-INFO-all --out "'results/SLiM_output/VCF_files/T1_'+str(seed))

os.system("vcftools --vcf "+'results/SLiM_output/VCF_files/T1_'+str(seed)+'.recode.vcf'+" --keep "+'results/SLiM_output/VCF_files/'+str(seed)+'_subset_T1.txt'" --recode --recode-INFO-all --out "'results/SLiM_output/VCF_files/T1_'+str(seed)+'_filtered_subset')