Open apoosakkannu opened 2 years ago
You could do this with bash commands like cat
and sed
from the command line. For example, with the example above...
cat sample1.fasta sample2.fasta sample3.fasta > samples.fasta
> sample.groups
for fasta in sample?.fasta
do
sample_id=`echo $fasta | sed s/.fasta//`
grep ">" $fasta | sed "s/>//" | sed "s/$/\t$sample_id/" >> sample.groups
done
This will use the file name (except for the .fasta
) as the group name in the groups file.
@pschloss, perhaps this would be a good place for some enhancements?
mothur > make.file(inputdir=./, type=fasta) mothur > make.group(file=current)
I like that - good idea! Pat
On Mon, Aug 8, 2022 at 9:17 AM Sarah Westcott @.***> wrote:
@pschloss https://github.com/pschloss, perhaps this would be a good place for some enhancements?
- Modify make.file so it could look for fasta files in a folder, and generate a file that could be used with the make.group command.
- Add the file option to make.group
mothur > make.file(inputdir=./, type=fasta) mothur > make.group(file=current)
— Reply to this email directly, view it on GitHub https://github.com/mothur/mothur.github.io/issues/90#issuecomment-1208117790, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJUUBGXM2NY7VTGN6NRACLVYECHFANCNFSM55SVSIHA . You are receiving this because you were mentioned.Message ID: @.***>
Hi, I am working on mothur for processing my data. I need to make a following command for several samples. make.group(fasta=sample1.fasta-sample2.fasta-sample3.fasta, groups=A-B-C)
I find it difficult to type 351 sample names in the above command. Could you give me any pointer on it to proceed for multiple samples?
I am working on high performance computing remote server.
Thanks in advance!