Daniel:Notebook/GenomeMiner/2013-7-25: Difference between revisions

From ZhangLabWiki
Jump to navigation Jump to search
>Djacobse
(Created page with "=HL155= Back to Calendar ==Bowtie Indexing== Tried to do some more work on this today, but I realized that I messed up naming the fasta file...")
 
>Djacobse
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 32: Line 32:
     1598009 (2.23%) aligned >1 times
     1598009 (2.23%) aligned >1 times
  28.94% overall alignment rate
  28.94% overall alignment rate
Looks like the result was the same, though it should be easier for analysis now.
'''Converting SAM to BAM'''
samtools view -bS hrcp_fullindex_samout.sam > hrcp_hl155.bam
==Perl==
I have also started learning Perl, since it seems to be a lot easier to work with (in most cases) than porting things to and from MATLAB.  Most of the commands seem to be similar, but there is slightly different syntax (such as $variable and @array).  I wrote a couple of pointless perl scripts this afternoon, and I won't even bother to put them on the wiki (they do pointless things).

Latest revision as of 00:28, 26 July 2013

HL155[edit]

Back to Calendar

Bowtie Indexing[edit]

Tried to do some more work on this today, but I realized that I messed up naming the fasta files for indexing. I gave all the probes the name "Probe_set1_m", where m was a integer number ranging from 1 to the total number of probes in the set. What I wanted, however, was "Probe_setn_m", where n was a number 1 to 4 indicating which set it was in. I repaired the mistake in the fasta files today. Individually I used this command in vi editor:

:%s/set1/setn/g

Again, n is an integer 2-4.

Then I made the fasta files into index files.

Creating the Index File

 bowtie2-build -f Probelist_Set1.fa,Probelist_Set2.fa,Probelist_Set3.fa,Probelist_Set4.fa hcrp_probeseq

Then bowtie.

Bowtie2

bowtie2 -x hcrp_probeseq -U s_2_1_Indx12.fq,s_2_1_Indx53.fq,s_2_1_Indx54.fq,s_2_1_Indx04.fq,s_2_1_Indx03.fq,
s_2_1_Indx05.fq_2_1_Indx02.fq,s_2_1_Indx13.fq,s_2_1_Indx01.fq,s_2_1_Indx55.fq,s_2_1_Indx49.fq,s_3_1_Indx11.fq,
s_3_1_Indx10.fq,s_2_1_Indx56.fq,s_2_1_Indx52.fq,s_3_1_Indx12.fq,s_2_1_Indx11.fq,s_2_1_Indx50.fq -S hrcp_fullindex_samout.out &

Output

djacobse@genome-miner:~/perl$ 71613792 reads; of these:
 71613792 (100.00%) were unpaired; of these:
   50886517 (71.06%) aligned 0 times
   19129266 (26.71%) aligned exactly 1 time
   1598009 (2.23%) aligned >1 times
28.94% overall alignment rate

Looks like the result was the same, though it should be easier for analysis now.

Converting SAM to BAM

samtools view -bS hrcp_fullindex_samout.sam > hrcp_hl155.bam

Perl[edit]

I have also started learning Perl, since it seems to be a lot easier to work with (in most cases) than porting things to and from MATLAB. Most of the commands seem to be similar, but there is slightly different syntax (such as $variable and @array). I wrote a couple of pointless perl scripts this afternoon, and I won't even bother to put them on the wiki (they do pointless things).