I have a binary matrix of gene presence or absence which looks like: [roary output]
Gene sample1 sample2 sample3 sample4
fliI 1 1 1 1
patB_1 1 1 1 1
pgpA 1 1 1 1
osmB 1 1 1 1
cspA 1 0 1 1
How can I convert to fasta so it looks like and technically aligned:
>sample1
11111
>sample2
11110
Is it possible to do this in R?