The example is using a file, primates.txt, from Table 10.1 of the book, Computational Genome Analysis.
Hy GCCCTCTTCCTAACACTCACAACAAAACTAACCAACACTAACATTACGGATGCCCAAGAA
Pa GCCCTTTTCCTAACACTCACAACAAAACTAACTAATACTAGTATTTCAGACGCCCAGGAA
Go GCCCTTTTCCTAACACTCACAACAAAGCTAACTAGCACCAACATCTCAGACGCCCAAGAA
Ho GCCCTTTTCCTAACACTCACAACAAAACTAACTAATACTAACATCTCAGACGCTCAGGAA
Po GCCCTTTTCCTAACACTCACAACGAAACTCACCAACACTAACATCTCAGATGCCCAAGAG
Above is the content of the Table 10.1. It will occur error, if you copy the sequence into the primates.txt. There are some works to do. We just use 4 rows like the example.
You have to delete the labels, like Hy, Pa, Go, etc., and replace the A,C,G,T into 1,2,3,4, respectively.
It is easy to using the replace function by any kind of editor even the simplest one, wordpad in windows.
Then you will get the 4 sequences.
322242442241121242121121111241122112124112144123314322211311
322244442241121242121121111241124114124134144421312322213311
322244442241121242121121113241124132122112142421312322211311
322244442241121242121121111241124114124112142421312324213311
You will get wrong result of displaying of "dapes".
Becuase you just read 4 items into R, that means the one sequence is one item.
So you have to using any kind of software to let the file to be the text file separating each letter with tab.
Then you will get correct primates.txt and get right result of displaying dapes.
Sharing my knowledge and experience is the main purpose of this web site. Because I know I also get helps from someone's web pages!
Sunday, February 17, 2008
Wednesday, January 16, 2008
20-80理論
查了一下網路上面的說明,其實意思都差不多,應用的地方不同罷了。
1. 對一個團體而言,
80%的工作都是由20%的人負責完成,
而剩下的20%工作,是由那80%的人負責完成。
2. 對加盟店而言
80%的收入主要都集中在20%的分店,
剩下的收入當然就是剩下的80%的分店。
其實意思都差不多,
就看你要成為那20%,還是那80%。
長尾理論,有人說是顛覆20-80理論,有人則認為是補其之不足。
我也認為兩個理論不是在講同一件事情,所以沒啥好爭的,反正討論串一堆,自己搞清楚是甚麼意思就好了。
而且時代一直在變化,很多道理和常識,一下子就不能"適用"了,雖然可以解釋大部分的例子,但是現在這個時代,特例才容易引起注意。
1. 對一個團體而言,
80%的工作都是由20%的人負責完成,
而剩下的20%工作,是由那80%的人負責完成。
2. 對加盟店而言
80%的收入主要都集中在20%的分店,
剩下的收入當然就是剩下的80%的分店。
其實意思都差不多,
就看你要成為那20%,還是那80%。
長尾理論,有人說是顛覆20-80理論,有人則認為是補其之不足。
我也認為兩個理論不是在講同一件事情,所以沒啥好爭的,反正討論串一堆,自己搞清楚是甚麼意思就好了。
而且時代一直在變化,很多道理和常識,一下子就不能"適用"了,雖然可以解釋大部分的例子,但是現在這個時代,特例才容易引起注意。
Friday, January 4, 2008
安裝j2sdk 1_4_2_16 遇到VM問題
我對java不是很在行,想說要換成較新版本的j2sdk,所以就下載了j2sdk 1_4_2_16來安裝。
但是安裝過程一直遇到Java virtual machine運行中,無法繼續安裝工作。
所以只能選擇取消或是重試,我嘗試了關掉其他程式。
還是無法成功重試,然後就掉入了無數次的反安裝,重新安裝。
後來開始爬文,結果也不太好找類似的文章。
很湊巧的,看到有人說點選IE工具裡的設定,有幾個選項是關於Microsoft VM的選項。
我把它全關閉,結果就順利的安裝起來了!
安裝過程,有看到Spybot 1.5跳出的警告訊息,所以也可以跟Spybot有關。
Anyway,如果有人也遭遇跟我一樣的問題,可以考慮關掉IE裡的VM選項,以及Spybot。
但是安裝過程一直遇到Java virtual machine運行中,無法繼續安裝工作。
所以只能選擇取消或是重試,我嘗試了關掉其他程式。
還是無法成功重試,然後就掉入了無數次的反安裝,重新安裝。
後來開始爬文,結果也不太好找類似的文章。
很湊巧的,看到有人說點選IE工具裡的設定,有幾個選項是關於Microsoft VM的選項。
我把它全關閉,結果就順利的安裝起來了!
安裝過程,有看到Spybot 1.5跳出的警告訊息,所以也可以跟Spybot有關。
Anyway,如果有人也遭遇跟我一樣的問題,可以考慮關掉IE裡的VM選項,以及Spybot。
Sunday, December 16, 2007
3C, 6C, NC
3C: Cmputer, Communication, Cosumer electronic.
6C: 3C, Car, Channel, Content
NC: 6C, Care, etc.
6C: 3C, Car, Channel, Content
NC: 6C, Care, etc.
Saturday, December 15, 2007
數字轉字串(number to string) 字串轉數字(string to number)
正確來說是 整數轉字串 字串轉整數
integer to string and string to integer
char *itoa(int value, char *buffer, int radix);
http://www.cplusplus.com/reference/clibrary/cstdlib/itoa.html
int atoi ( const char * str );
http://www.cplusplus.com/reference/clibrary/cstdlib/atoi.html
integer to string and string to integer
char *itoa(int value, char *buffer, int radix);
http://www.cplusplus.com/reference/clibrary/cstdlib/itoa.html
int atoi ( const char * str );
http://www.cplusplus.com/reference/clibrary/cstdlib/atoi.html
Subscribe to:
Posts (Atom)
