def file_type(s):
	"""
	Take in a filename and determine if the extension indicates a fasta or fastq file.

	Arguments
	---------
	s : str, a filename string

	Returns
	---------
	out : string, either 'fasta' or 'fastq' if file has an accepted extension, or ValueError.

	Examples
	---------
	>>> file_type("example_file.fasta")
	"fasta"
	>>> file_type("example_file.fa")
	"fasta"
	>>> file_type("example_file.fastq")
	"fastq"
	>>> file_type("example_file.fq")
	"fastq"
	>>> file_type("example_file.txt")
	ValueError: Input file must be in fasta or fastq format. Accepted file extensions: fa, fq, fasta, or fastq.	

	"""
	suffix = s.split(".")[-1]

	if suffix == "fa" or suffix == "fasta":
		return "fasta"

	elif suffix == "fq" or suffix == "fastq":
		return "fastq"

	else:
		raise ValueError("File must be in fasta or fastq format. "+\
			"Accepted file extensions: fa, fq, fasta, or fastq.")