Hello, I have installed Seqkit.I am trying to list out some sequences based on the Seq ids.provided in a text doc.I am using this code. my ids.txt file looks like this: bin1 wbah10_accessory_1487_length_224941 bin2 wbah10_accessory_1485_length_153623 bin4 wbah10_accessory_1593_length_85091 bin5 wbah10_accessory_0973_length_66623 bin6 wbah10_accessory_0972_length_51198 bin7 wbah10_accessory_1486_length_50757 bin8 wbah10_accessory_0969_length_49768
and the header in the query file looks like this:
bin1 wbah10_accessory_1487_length_224941 tccgccttcgctaaagcttccgccttcgccaaggcttcggcgcgacaagtccgcttcggcccgatttctcaccagaatttgcgattttttacggcgccggactcgcggagggtccccctcacccggaatccgcgcgtcgcgcggattccggcctctccccggcggggagaggcgaagggaagcggcccttatttcggcaggaattcctgcgcaacgcccataccga
seqkit grep -f ids.txt --id-regexp "gene:([^ ]+)" seqs.fa
but I am getting an error mentioned below:
[ERRO] fastx: stdin not detected
I am new to the command line approach.Any help would be appreciated.
Thanks in advance
Sohini
so, are the list gene names?
The list are gene ids And the fasta file have protein sequences which have the gene id written in the header description
above solution should work.
This worked very well. It was so easy. Can you explain what does this "gene:([^ ]+)" mean. In the tool help I found this line:
--id-regexp string regular expression for parsing ID (default "^([^\s]+)\s?") what does the symbols mean?
Test using regular expression tester page.
Thanks, this was really important for me to see.
it's a regular expression for matching "gene:xxxxx", 、
[^ ]+is for gene id consisting of non-space characters, and seqkit has to use()to capture the xxx as FASTA ID.ashish : I moved @shenwei356's comment to an answer. Since it worked for you, please accept the answer (use green check mark) to provide closure for this question.