Dear All,
I am trying to get the 3' and 5' UTR of the BRCA1 and BRCA2 mRNA. I came to know about entrez utilities to do it like this:
source: https://www.ncbi.nlm.nih.gov/books/NBK179288/
and the code is:
ThreePrimeUTRs() {
xtract -pattern INSDSeq -ACC INSDSeq_accession-version -SEQ INSDSeq_sequence \
-group INSDFeature -if INSDFeature_key -equals CDS -PRD "(-)" \
-block INSDQualifier -if INSDQualifier_name \
-equals product -PRD INSDQualifier_value \
-block INSDFeature -pfc "\n" -element "&ACC" -rst \
-last INSDInterval_to -element "&SEQ" "&PRD" |
while read acc pos seq prd
do
if [ $pos -lt ${#seq} ]
then
echo -e ">$acc 3'UTR: $((pos+1))..${#seq} $prd"
echo "${seq:$pos}" | fold -w 50
elif [ $pos -ge ${#seq} ]
then
echo -e ">$acc NO 3'UTR"
fi
done
}
esearch -db nuccore -query "3.6.4.12 [ECNO]" |
efilter -molecule mrna -source refseq |
efetch -format gbc | ThreePrimeUTRs
When I run this I keep getting error saying;
**Unrecognized argument '-if'
No -element before 'INSDFeature_key'
Unrecognized argument '-equals'
No -element before 'CDS'**
Can someone please help me know what is going wrong? And, can I get the 5' UTR following the same code? And, finally, I also want to get the SNPs in the 3' and 5' UTR?
Thank you so much! DK
If you put the code in a file, make it executable and run it, it produces a result.
truncated for brevity.
You will need to change your query (e.g.
-query "BRCA"
) to get what you need.Thanks! but when I run I keep getting this error above
Unrecognized argument '-if' No -element before 'INSDFeature_key' Unrecognized argument '-equals' No -element before 'CDS'*
Are you using the
bash
shell? If not, issue the commandbash
and then run the file at the new system prompt that should show up.OK, Thanks. I will try and update here.
Isn't this question same as SNPs; entrez utilities ?
Not exactly, because in that I had no idea of the approach. Here, I have found a way, but having errors and missing features to get the SNPs.
I have it on good information that if you update your implementation of eutils, this should work fine.