add write.fasta function and use R markdown