8) Generating five 100 AA long protein sequences and storing them in a FASTA file YS
Contents
Idea
- 20개의 amino acid를 랜덤하게 나타나게 하는 작업을 100번 반복
- 1.의 코드를 5번 반복
- 반복작업은 for loop사용
- rand를 이용해서 chars안의 요소들을 랜덤하게 배치
Code
#!/usr/bin/perl |
Result
Application
-
키보드로부터 입력을 이용해 amino acid 의 갯수와 반복횟수를 입력받아 원하는 sequence의 갯수와 sequence의 길이를 출력한다.
-
키보드로부터 입력을 받을때는 <STDIN>을 이용한다.
Code_application
#!/usr/bin/perl print "Put in the number of times to repeat : "; print "Put in the number of sequence : "; for($i = 1; $i <= $repeat ; $i++) |