#!/usr/bin/runAmos -C
# The "FRCurve" pipeline

#? Feature-Response Curve pipeline
#?
#? Usage:          
#?      FRCurve [params] \
#?		-D GENOME_SIZE=<n>	- Genome size (number of bps)
#?		-D BANK=<n>		- AMOS bank name
#?		
#? Description:
#?	The Feature-Response curve characterizes the sensitivity (coverage) of the sequence 
#?	assembler as a function of its discrimination threshold (number of features).
#?	Given any set of features computed by the amosvalidate pipeline, the response (quality) 
#?	of the assembler output is analyzed as a function of the maximum number of possible 
#? 	errors (features) allowed in the contigs. 
#?	For more details see the wiki page at: 
#?	http://sourceforge.net/apps/mediawiki/amos/index.php?title=FRCurve
#?
#? Output:
#?	The Feature-Response curve (FRC) is saved in file "FRC.txt", while 
#?	FRCs for each feature type are saved respectively in: 
#?	"FRC_coverage.txt", "FRC_polymorphism.txt", "FRC_breakpoint.txt", 
#?	"FRC_kmer.txt", "FRC_matepair.txt" and "FRC_misassembly.txt"
#?
#? Output file format:
#?	Each file contains the FRCs in 3-columns format
#?	- column 1 = feature threshold T;
#?	- column 2 = contigs' N50 associated to the threshold T in column 1;
#? 	- column 3 = cumulative size of the contigs whose number of features is <= T;
#?

BINDIR=/usr/bin

# Genome size (number of bps)
GENOME_SIZE = 1

# Banks name
BANK = bank.bnk

#---Getting down to business---#

## Running amosvalidate
10: $(BINDIR)/amosvalidate $(BANK)

## Compute Feature-Response Curve
20: $(BINDIR)/getFRCvalues -g $(GENOME_SIZE) -b $(BANK)


