jlw-laputa / ngsplot

Automatically exported from code.google.com/p/ngsplot
0 stars 0 forks source link

updating reference genome (eg. mm10) #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. after download mm10 files from ngsplot homepage
2. I tried "ngsplotdb.py install ~/ngs/ngsplotdb_mm10_75_3.00.tar.gz"
3. however, I got this : Extracting information from package... contains 89 
tables.
Open ~/ngs/ngsplot/database/gn_list.txt error: your ngs.plot database may be 
corrupted.

I also tried, rm -R ~/ngs, which delete all of ngs related program and 
re-install ngsplot (I checked the system works very well by running NGS 
example.bam that homepage provides). 

What is the expected output? What do you see instead?
decribed above

What version of the product are you using? On what operating system?
I downloaded the latest one : ngsplot-2.41.3.tar.gz

Please provide any additional information below.

and one more question, I am trying to add reference genome,because I made 

ChIP-seq bamfile using bowtie2 and samtools based on mm10. 

However, as I aligned based on mm9, the ngsplot didn't work. showing lines like 
below:

sungwook@MALCOM:~/Downloads/H3K27ac$ ngs.plot.r -G mm9 -R tss -C SRR566893.bam 
-O testNGS.tss
Configuring variables...
Using database:
~/ngs/ngsplot/database/mm9/mm9.ensembl.genebody.protein_coding.RData
Done
Loading R libraries.....Done
Analyze bam files and calculate coverageError in FUN("SRR566893.bam"[[1L]], 
...) : failed to build index
  file: SRR566893.bam
Calls: headerIndexBam ... indexBam -> sapply -> sapply -> lapply -> FUN -> .Call
In addition: Warning messages:
1: In FUN("SRR566893.bam"[[1L]], ...) :
  [bam_index_core] the alignment is not sorted (SRR566893.2): 20-th chr > 13-th chr
2: In FUN("SRR566893.bam"[[1L]], ...) :
  [bam_index_build2] fail to index the BAM file.
Execution halted

I do not understand the problem here. 

could you please find out how to solve this?

Thank you so much. 

Sincerely, Sungwook.   

Original issue reported on code.google.com by risky...@gmail.com on 17 Sep 2014 at 3:50

GoogleCodeExporter commented 9 years ago
I fixed and solved adding mm10 to my ngsplot database. 

the problem was selecting environment variables to my ~/.profile.

However, the problem still exists when I try to perfrom ngsplot using ChIP-seq 
data 

from ENCODE (using fastq-dump and bowtie2, I changed to bam file. and this was 
valid, beacuse I used this bam file to make UCSC file and successfully uploaded 
to 
Genome Browser). I still get the below comments: 

 sungwook@MALCOM:~/ngs/ngsplot$ ngs.plot.r -G mm10 -R tss -C ~/Downloads/H3K27ac/SRR566893.bam -O test.tss
Configuring variables...
Using database:
/home/sungwook/ngs/ngsplot/database/mm10/mm10.ensembl.genebody.protein_coding.RD
ata
Done
Loading R libraries.....Done
Analyze bam files and calculate coverageError in 
FUN("/home/sungwook/Downloads/H3K27ac/SRR566893.bam"[[1L]], ...) : 
  failed to build index
  file: /home/sungwook/Downloads/H3K27ac/SRR566893.bam
Calls: headerIndexBam ... indexBam -> sapply -> sapply -> lapply -> FUN -> .Call
In addition: Warning messages:
1: In FUN("/home/sungwook/Downloads/H3K27ac/SRR566893.bam"[[1L]], ...) :
  [bam_index_core] the alignment is not sorted (SRR566893.2): 20-th chr > 13-th chr
2: In FUN("/home/sungwook/Downloads/H3K27ac/SRR566893.bam"[[1L]], ...) :
  [bam_index_build2] fail to index the BAM file.
Execution halted

Is the bam file needs to be sorted?

Original comment by risky...@gmail.com on 18 Sep 2014 at 1:53

GoogleCodeExporter commented 9 years ago
Problem solved!

using samtools sort, I sorted the bam file and successfully run NGSPLOT!

Original comment by risky...@gmail.com on 18 Sep 2014 at 2:16