Hi John,
One of our engineers created a mock-up of how to do this in bash script.
In order to run this script, you will need to download the twoBitToFa
executable for your machine: http://hgdownload.cse.ucsc.edu/admin/exe/.
while read chrom start val
do
end=`expr $start + 1`
base=`twoBitToFa -noMask /cluster/data/hg18/hg18.2bit:$chrom:$start-$end
stdout | tail -1`
if test $val == $base
then
echo $chrom $start $val +
else
rev=`echo -e ">test\n$base" | faRc -keepCase stdin stdout | tail -1`
if test $val == $rev
then
echo $chrom $start $val -
else
echo $chrom $start $val BADVALUE
fi
fi
done
Also note that his method may be a bit slow, so if you have thousands or
millions of values, you may want something more sophisticated. Please
contact us again at [email protected] if you have any further questions.
---
Luvina Guruvadoo
UCSC Genome Bioinformatics Group
On 1/12/2012 1:55 PM, John linux-user wrote:
> Hello
>
> I have a simple question. How to systematically pull out the strand info
> (+/-) for a given set of human hg18 chromosome positions and base like
>
>
> chr position base
>
> chr1 100000 G
> chr2 200000 T
> ....
>
>
> I like to know the strand info, positive/negative strand, for this base
> calling without any additional info available. Could you please help? Thanks.
>
> John
> _______________________________________________
> Genome maillist - [email protected]
> https://lists.soe.ucsc.edu/mailman/listinfo/genome
_______________________________________________
Genome maillist - [email protected]
https://lists.soe.ucsc.edu/mailman/listinfo/genome