# This makefile automates the data collection for the Animal controls



# IMPORTANT 
# THIS FILE CREATES A NEW UPDATED VERSION OF THE ANIMAL CONTROL DATA  
# IF YOU WANT TO RECREATE THE ANALYSIS GO TO "Makefile_analysis" 


# Rule structure 
# target: the exe producing the target, dependency_1, dependency_n
#    command executing the script producing the target
# $< replaces the first dependecy, by setting the first dependency to the exe, calling it a second time explicitly is no longer needed
# $^ replaces all dependencies exactly in the order that they are given, as the arguments are given positional, the order is therefore now very important




# Targets

all: Data/derived/animal_toxins_combined.fasta\
Data/derived/animal_toxins_combined_IDgenus.tsv\
Data/derived/animal_toxins_combined_ID_Type.tsv\
Data/derived/animal_toxins_combined_source.tsv\
Data/derived/animal_toxins_combined_clean.fasta\
Data/derived/animal_control_proteins_raw.fasta\





		
# Delete the duplicated IDs from the animal toxins
Data/derived/animal_toxins_combined.fasta: Code/python/deletion_duplicates_fragments.py Data/raw/animal/animal_toxins_combined.fasta
		python $^
		

		
# Clean the combined animal toxins fasta file and generating three tables.
Data/derived/animal_toxins_combined_IDgenus.tsv: Code/python/fasta_cleaning/cleanOneFile.py Data/derived/animal_toxins_combined.fasta
		python $^
		
Data/derived/animal_toxins_combined_ID_Type.tsv: Code/python/fasta_cleaning/cleanOneFile.py Data/derived/animal_toxins_combined.fasta
		python $^

Data/derived/animal_toxins_combined_source.tsv: Code/python/fasta_cleaning/cleanOneFile.py Data/derived/animal_toxins_combined.fasta	
		python $^

Data/derived/animal_toxins_combined_clean.fasta: Code/python/fasta_cleaning/cleanOneFile.py Data/derived/animal_toxins_combined.fasta
		python $^

# Create the animal control protein set

Data/derived/animal_control_proteins_raw.fasta: Code/python/data_collection_part1_3.py Data/derived/animal_toxins_combined_IDgenus.tsv
		python $^

