---

500 DIM SEQ(2,MAXL) 510 NSEQ=2 515 FOR I=1 TO 2 520 PRINT :PRINT USING "Enter sequence number##:";I; 525 INPUT " ",A$ 530 FLAG=INSTR("~=FIRST AND K<=LAST THEN LGTH(I)=LGTH(I)+1:SEQ(I,LGTH(I))=INSTR("ACGT",MID$(A$,J,1))-1 650 NEXT J 655 IF K>LAST GOTO 665 660 IF SEQ(I,LGTH(I))>-1 GOTO 595 ELSE LGTH(I)=LGTH(I)-1 665 PRINT:PRINT USING "#### bases read.";LGTH(I):PRINT 670 CLOSE 1 675 ON FLAG GOSUB 690,710 680 NEXT I 685 GOTO 730 690 PRINT:PRINT "Generating the compliment.":FOR J=1 TO LGTH(I) 695 SEQ(I,J)=3-SEQ(I,J) 700 IF SEQ(I,J)=4 THEN SEQ(I,J)=-1 705 NEXT 710 PRINT "Generating the inverse.":FOR J=1 TO LGTH(I)/2 715 SWAP SEQ(I,LGTH(I)-J+1),SEQ(I,J) 720 NEXT 725 RETURN 730 PRINT:PRINT "Strike any key to enter editor. Use escape (Esc) to exit." 735 A$=INKEY$:IF A$="" GOTO 735 740 FIRST=0:BASE=1:FIRST2=1:PGE=0 743 CLS:FIRST1=PGE*560+1:ROW=3:COL=1 745 LAST1=FIRST1+559:IF LAST1>LGTH(1) THEN LAST1=LGTH(1) 747 LOCATE ROW,COL:FOR I=FIRST1 TO LAST1 750 PRINT MID$("NACGT",SEQ(1,I)+2,1); 755 IF I MOD 80 =0 THEN PRINT:PRINT 760 NEXT:PRINT " "; 765 FOR I=4 TO 24 STEP 3:LOCATE I,1:PRINT STRING$(80," "):NEXT 766 IF FIRST>FIRST1+559 THEN 800 767 IF FIRSTLGTH(2) THEN LAST2=LGTH(2) 769 LOCATE 4+(J\80)*3,J MOD 80+1 770 FOR I=FIRST2 TO LAST2 775 IF FIRST+I<=LGTH(1) AND SEQ(2,I)=SEQ(1,FIRST+I) THEN PRINT "-"; ELSE PRINT MID$("NACGT",SEQ(2,I)+2,1); 780 J=J+1:IF J MOD 80=0 THEN LOCATE CSRLIN+2,1 785 NEXT 800 BASE=((ROW-3)\3)*80+COL+PGE*560:S=(ROW-3) MOD 3+1:IF S=2 THEN BASE=BASE-FIRST 805 LOCATE 1,1:PRINT USING "####";BASE:LOCATE ROW,COL:COLOR 0,7:PRINT CHR$(SCREEN(ROW,COL)):COLOR 2 810 A$=INKEY$:IF A$="" GOTO 810 815 IF A$="+" THEN LOCATE 1,1:INPUT "Enter the number of bases the second sequence is to be shifted: ",SHIFT:FIRST=FIRST+SHIFT:LOCATE 1,1:PRINT STRING$(79," "):GOTO 765 820 LOCATE ROW,COL:PRINT CHR$(SCREEN(ROW,COL)) 825 IF A$=CHR$(0)+CHR$(80) THEN ROW=ROW+S:IF ROW>22 THEN ROW=22:BEEP:GOTO 800:ELSE GOTO 800 830 IF A$=CHR$(0)+CHR$(75) THEN COL=COL-1:IF COL<1 THEN COL=1:BEEP:GOTO 800:ELSE GOTO 800 835 IF A$=CHR$(0)+CHR$(77) THEN COL=COL+1:IF COL>80 THEN COL=80:BEEP:GOTO 800:ELSE GOTO 800 840 IF A$=CHR$(0)+CHR$(72) THEN ROW=ROW-3+S:IF ROW<3 THEN ROW=3:BEEP:GOTO 800:ELSE GOTO 800 845 IF A$=CHR$(0)+CHR$(82) THEN FOR I=LGTH(S) TO BASE STEP -1:SEQ(S,I+1)=SEQ(S,I):NEXT:SEQ(S,BASE)=-1:LGTH(S)=LGTH(S)+1:ON S GOTO 743,765 850 IF A$=CHR$(0)+CHR$(83) THEN FOR I=BASE TO LGTH(S):SEQ(S,I)=SEQ(S,I+1):NEXT:LGTH(S)=LGTH(S)-1:ON S GOTO 743,765 855 IF A$=CHR$(9) OR A$=CHR$(0)+CHR$(15) THEN SHIFT=BASE-FIRST+1:FIRST=BASE-1:GOTO 765 860 IF A$=CHR$(27) GOTO 905 865 IF A$="A" OR A$="a" OR A$="1" THEN SEQ(S,BASE)=0:LOCATE ROW,COL:PRINT "A":GOTO 800 870 IF A$="C" OR A$="c" OR A$="2" THEN SEQ(S,BASE)=1:LOCATE ROW,COL:PRINT "C":GOTO 800 875 IF A$="G" OR A$="g" OR A$="3" THEN SEQ(S,BASE)=2:LOCATE ROW,COL:PRINT "G":GOTO 800 880 IF A$="T" OR A$="t" OR A$="4" THEN SEQ(S,BASE)=3:LOCATE ROW,COL:PRINT "T":GOTO 800 885 IF A$="N" OR A$="n" OR A$="5" THEN SEQ(S,BASE)=-1:LOCATE ROW,COL:PRINT "N":GOTO 800 886 IF A$=CHR$(0)+CHR$(73) THEN PGE=PGE-1:IF PGE<0 THEN PGE=0:BEEP:GOTO 800:ELSE GOTO 743 887 IF A$=CHR$(0)+CHR$(81) THEN PGE=PGE+1:GOTO 743 890 BEEP 895 GOTO 800 900 END 905 CLS:INPUT "Do you want to save the changes you have made (Y/N)? ",A$ 910 IF LEFT$(A$,1)="N" OR LEFT$(A$,1)="n" GOTO 980 915 PRINT:INPUT "Enter the file into which the corrected sequence is to be saved: ",FILE$ 920 PRINT:PRINT "Enter the title for the corrected sequence: ":INPUT "",TITLE$ 925 FILE$=DISK$+FILE$ 930 PRINT:INPUT "Enter the number of the sequence to be saved (1, 2 or 3 to meld): ",S 935 OPEN FILE$ FOR OUTPUT AS #1 938 PRINT #1,";@@ saved "+DATE$+" "+TIME$+" edited 00-00-0000 00:00:00" 940 PRINT #1,TITLE$ 945 F=0:IF S=3 GOTO 985 950 FOR I=1 TO LGTH(S) 955 PRINT #1,MID$("NACGT",SEQ(S,I)+2,1); 960 IF I MOD 60 = 0 THEN PRINT #1,"" 965 NEXT 970 PRINT #1,"1" 975 PRINT:PRINT LGTH(S)+FIRST*F;" bases saved." 980 ERASE SEQ:CLOSE 1:RETURN 985 FOR I=1 TO FIRST 990 PRINT #1,MID$("NACGT",SEQ(1,I)+2,1); 995 IF I MOD 60 =0 THEN PRINT #1,"" 996 NEXT 997 F=1:S=2:GOTO 950 1000 END

---

The views and opinions stated within this web page are those of the author or authors which wrote them and may not reflect the views and opinions of the ISP or account user which hosts the web page. The opinions may or may not be those of the Chairman of The Skeptic Tank.

Return to The Skeptic Tank's main Index page.

E-Mail Fredric L. Rice / The Skeptic Tank