fasten 0.9.0

A set of scripts to run basic analysis on fastq files
Documentation

# Bins: src/bin/*.rs -> target/debug/*
DEBUG_BINS := $(patsubst src/bin/%.rs, target/debug/%, $(wildcard src/bin/*.rs))

# Bins: src/bin/*.rs -> target/release/*
RELEASE_BINS := $(patsubst src/bin/%.rs, target/release/%, $(wildcard src/bin/*.rs))

all: $(DEBUG_BINS) $(DEBUG_LIBS) fasten/doc

release: $(RELEASE_BINS)

debug: $(DEBUG_BINS)

$(DEBUG_BINS):
	cargo build
	echo "Built debug binaries at target/debug"

# Rule to build release binaries
$(RELEASE_BINS):
	cargo build --release
	echo "Built release binaries at target/release"

# Test target: runs tests for each binary if corresponding script exists
test: $(DEBUG_BINS)
	for bin in clean combine kmer metrics pe quality_filter randomize regex repair replace sample shuffle straighten trim validate sort progress mutate normalize convert inspect; do \
		if [ -e ./tests/fasten_$$bin.sh ]; then \
			bash ./tests/fasten_$$bin.sh; \
		fi; \
	done

target/doc: 
	cargo doc --no-deps

# Clean target: removes the target directories if they exist
clean:
	if [[ -e ./target/debug ]]; then \
		rm -rf ./target/debug; \
	fi
	if [[ -e ./target/release ]]; then \
		rm -rf ./target/release; \
	fi
	if [[ -e ./target/doc ]]; then \
		rm -rf ./target/doc; \
	fi