Extracting DE genes from annotation file
I'm working with differentially expressed genes from different comparisions. I ran HISAT2, StringTie and DESeq2 and now I have txt files of all my DE genes from the 9 comparisons. I'm trying to extract out the locations and names of the DE genes from my merged annotation file (I have GTF and FASTA format of this file) and I can't draw them out.
TXT file ex of DE genes: MSTRG.1 MSTRG.1356 MSTRG.1345
I've used grep, samtools xargs faidx, and I still cannot figure it out. Any advice? Thank you!
• 1,540 views
•
link
1 answer
save as .sh
#!/bin/bash
while read p; do
grep -w -A1 "$p" mergedfasta.fa | head -n 2 >> comparison.de.fa
done < degenes.txt
• 0 views
•
link
Log in to answer this question.