bioinfolec_3rd_20070629

745 views
672 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
745
On SlideShare
0
From Embeds
0
Number of Embeds
37
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

bioinfolec_3rd_20070629

  1. 1. • • •
  2. 2. • • • •
  3. 3. • • • • •
  4. 4. • • • • • • • • • • •
  5. 5. • • • • • • • • $ cat < nums.tab 11.284424023341844 13.29881132278286 15.210930332045214 7.093399689668905 11.997572060631573 7.779530907059893 9.452057374370979 10.911760763046015 8.88551276533381 9.155650726802886
  6. 6. • • $ sort -n nums.tab 8.88551276533381 9.155650726802886 9.452057374370979 10.911760763046015 11.284424023341844 13.29881132278286 11.997572060631573 7.779530907059893 15.210930332045214 7.093399689668905 $ sort -n nums.tab | cat -n 1 8.88551276533381 9.155650726802886 2 9.452057374370979 10.911760763046015 3 11.284424023341844 13.29881132278286 4 11.997572060631573 7.779530907059893 5 15.210930332045214 7.093399689668905 $ sort -n nums.tab | cat -n | head -n2 1 8.88551276533381 9.155650726802886 2 9.452057374370979 10.911760763046015
  7. 7. • sort • • cut • • less file $ sort nums.tab | less $ cut -f2 nums.tab
  8. 8. wc [options] file ... • tr grep $ sort nums.tab | less $ wc nums.tab 5 10 183 nums.tab $ wc -l nums.tab 5 nums.tab
  9. 9. re grep [options] regular_expression file ... regular_expression $ cat nums.tab 11.284424023341844 13.29881132278286 15.210930332045214 7.093399689668905 11.997572060631573 7.779530907059893 9.452057374370979 10.911760763046015 8.88551276533381 9.155650726802886 $ grep “12” nums.tab 8.88551276533381 9.155650726802886 $ grep -v “12” nums.tab 11.284424023341844 13.29881132278286 15.210930332045214 7.093399689668905 11.997572060631573 7.779530907059893 9.452057374370979 10.911760763046015
  10. 10. $ cat nums.tab 11.284424023341844 13.29881132278286 15.210930332045214 7.093399689668905 11.997572060631573 7.779530907059893 9.452057374370979 10.911760763046015 8.88551276533381 9.155650726802886 $ grep “^8” nums.tab 8.88551276533381 9.155650726802886 $ grep “86$” nums.tab 11.284424023341844 13.29881132278286 8.88551276533381 9.155650726802886 $ grep “5$” nums.tab | wc -l 2 $ cut -f2 nums.tab | grep “^7” 7.093399689668905 7.779530907059893
  11. 11. tr [options] string1 string2 sed $ cat nums.tab 11.284424023341844 13.29881132278286 15.210930332045214 7.093399689668905 11.997572060631573 7.779530907059893 9.452057374370979 10.911760763046015 8.88551276533381 9.155650726802886 $ tr . - < nums.tab 11-284424023341844 13-29881132278286 15-210930332045214 7-093399689668905 11-997572060631573 7-779530907059893 9-452057374370979 10-911760763046015 8-88551276533381 9-155650726802886 $ tr . - < nums.tab $ cat nums.tab | tr . -
  12. 12. $ tr 123 abc < nums.tab aa.b844b40bcc4a844 ac.b988aacbb78b86 a5.ba09c0ccb045ba4 7.09cc99689668905 aa.99757b0606ca57c 7.7795c090705989c 9.45b057c74c70979 a0.9aa76076c0460a5 8.8855ab765ccc8a 9.a556507b680b886 $ tr ‘t’ , < nums.tab 11.284424023341844,13.29881132278286 15.210930332045214,7.093399689668905 11.997572060631573,7.779530907059893 9.452057374370979,10.911760763046015 8.88551276533381,9.155650726802886 $ tr -d . < nums.tab 11284424023341844 1329881132278286 15210930332045214 7093399689668905 11997572060631573 7779530907059893 9452057374370979 10911760763046015 888551276533381 9155650726802886 $ tr 123 abc < nums.tab | tr “[:lower:]” “[:upper:]” AA.B844B40BCC4A844 AC.B988AACBB78B86 A5.BA09C0CCB045BA4 7.09CC99689668905 AA.99757B0606CA57C 7.7795C090705989C 9.45B057C74C70979 A0.9AA76076C0460A5 8.8855AB765CCC8A 9.A556507B680B886
  13. 13. • • • • • $ sort noexist.txt > stdout.txt sort: noexist.txt: No such file or directory
  14. 14. $ sort noexist.txt > stdout.txt 2> error.log $ sort noexist.txt > all.txt 2>&1 $ sort noexist.txt 2>&1 | less $ sort noexist.txt 2>&1 > stdout.txt | cat -n
  15. 15. • jsmbp:~/work/blast sesejun$ ./blast-2.2.16/bin/blastall -p blastn -d yeast.nt -i myseq.fasta -o myseq.out jsmbp:~/work/blast sesejun$ ./blast-2.2.16/bin/blastall -p blastn -d yeast.nt -i myseq.fasta > myseq.out
  16. 16. • • •
  17. 17. cp *.txt dir/ cp a.txt b.txt c.txt dir/ $ cp a* dir/ $ mv b*.txt dir/
  18. 18. $ cp {a,b,c}.txt dir/
  19. 19. • • • #!/bin/bash ~/work/blast/blast-2.2.16/bin/blastall -p blastn -d yeast.nt -i myseq.fasta • •
  20. 20. #!/bin/bash ~/work/blast/blast-2.2.16/bin/blastall -p blastn -d yeast.nt -i myseq1.fasta ~/work/blast/blast-2.2.16/bin/blastall -p blastn -d yeast.nt -i myseq2.fasta ~/work/blast/blast-2.2.16/bin/blastall -p blastn -d yeast.nt -i myseq3.fasta • •
  21. 21. #!/bin/bash for i in {1,2,3}.fasta;do echo $i ~/work/blast/blast-2.2.16/bin/blastall -p blastn -d ../yeast.nt -i ”$i” > ”$i”.result done
  22. 22. #!/bin/bash for i in *.fasta;do echo $i ~/work/blast/blast-2.2.16/bin/blastall -p blastn -d ../yeast.nt -i ”$i” > ”$i”.result done
  23. 23. a. b. c. d. • • jsmbp:~ sesejun$ cd work/blast jsmbp:~/work/blast sesejun$ ./blast-2.2.16/bin/blastall -p blastn -d yeast.nt -i myseq.fasta -o myseq1.out jsmbp:~/work/blast sesejun$ ./blast-2.2.16/bin/blastall -p blastn -d yeast.nt -i myseq.fasta > myseq2.out
  24. 24. • • • • mv ~/Desktop/bayanus.tar . • mv ~/Desktop/bayanus.tar ~/work/blast • tar xvf bayanus.tar • • mv ~/Desktop/bayanum.tar .; tar zxvf bayanus.tar.gz •
  25. 25. $ mkdir tmp $ cp bayanus/{1,3,7,9}.fasta tmp/ <- $ ls tmp/ <- 1.fasta, 3.fasta,... $ ls yeast* $ ls <- 2 ls $ cd bayanus
  26. 26. •$ bash blast.sh #!/bin/bash ~/work/blast/blast-2.2.16/bin/blastall -p blastn -d yeast.nt -i myseq.fasta
  27. 27. • • • #!/bin/bash for i in *.fasta;do echo $i ~/work/blast/blast-2.2.16/bin/blastall -p blastn -d ../yeast.nt -i ”$i” > ”$i”.result done • • •

×