I have a sequence file and want to count consecutive character "N", with the tandem's position of occurrence and its length. Say I have a file named mySequence.fasta like this:
>sequence-1
ATCGCTAGCATNNNNNNNNNNNNNNCTAGCATCATGCNNNNNNATACGCATCACANNNNNNNNNCgcatATCAC
and anticipated output should be like this:
Position 12 N 15
Position 38 N 6
Position 56 N 9
Kindly help me to solve this by awk or sed providing my file name mySequence.fasta