Skip to content

Instantly share code, notes, and snippets.

@ag1805x
Last active August 15, 2020 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ag1805x/26ae59c2495f747b5fa7a4156be66599 to your computer and use it in GitHub Desktop.
Save ag1805x/26ae59c2495f747b5fa7a4156be66599 to your computer and use it in GitHub Desktop.
Extract mature and precursor miRNA list from miRBase gff3 file. Can be used for inter-conversion
# Extract mature and precursor miRNA list from miRBase gff3 file
# Can be used for interconversion
grep -v '#' hsa.gff3 | grep -w "miRNA" | cut -f9 > temp
paste <(cut -d ';' -f1 temp | cut -d '=' -f1) <(cut -d ';' -f2 temp | cut -d '=' -f1) <(cut -d ';' -f3 temp | cut -d '=' -f1) <(cut -d ';' -f4 temp | cut -d '=' -f1) | head -n1 >> miRbaseIDs.tsv
paste <(cut -d ';' -f1 temp | cut -d '=' -f2) <(cut -d ';' -f2 temp | cut -d '=' -f2) <(cut -d ';' -f3 temp | cut -d '=' -f2) <(cut -d ';' -f4 temp | cut -d '=' -f2) >> miRbaseIDs.tsv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment