Jbrowse:diagnostic message object response error
这种错误应该就是bam文件没有排序,或者没有建立索引。
貌似samtools sort 输出文件不能和输入文件一样,不然就没排序?这导致了后面的麻烦
2019-3-5 23:45:23:排完序之后会有输出 xx merge
受了下面内容的影响,以为是web 服务器问题
Apache Configuration Note
If you are using the Apache web server, please be aware that the module
mime_magic
can cause BAM files to be served incorrectly. Usually, the error in the web developer console will be something like “Not a BAM file”. Some packaged versions of Apache, particularly on Red Hat or CentOS-based systems, are configured with this module turned on by default. We recommend you deactivate this Apache module for the server or directory used to serve JBrowse files. If you do not want to deactivate this module for the entire server, try adding this line to your HTTPD config or .htaccess file:
1 | AddType application/octet-stream .bam .bami .bai |
1 | # 停止、开启服务, |
http://10.164.6.4/JBrowse-1.16.3
正确的操作
How do I set up a BAM file?有bam、bigwig的perl脚本生成json格式的配置文件
When you set up a BAM file in jbrowse, the best way to do it is as follows
- Put the BAM file and the BAM index (.bai) in your data directory (e.g. you downloaded jbrowse, and your did prepare-refseqs.pl, which created a data subfolder. Put your BAM file in there)
- Then use add-bam-track.pl like this: add-bam-track.pl –label mybam –bam_url mybam.bam –in data/trackList.json
- This will only create a simple section of configuration in your data directory’s trackList.json for the BAM file that will look like
1 | { |
This basically just instructs JBrowse to fetch “mybam.bam” using the class that understands BAM data, “JBrowse/Store/SeqFeature/BAM”, and display it with the “Alignments2” tracktype. If this does not work please post to github or gmod-ajax@lists.sourceforge.net
Other notes
- Don’t use bam-to-json.pl, it is old and converting your probably humongous next-gen-sequencing BAM into text json is unwieldy
- Your bam index should just be named the same as your BAM with .bai on the end
- The add-bam-track.pl does NOT copy the bam to your data directory for you, you put it there yourself, and specify the –bam_url appropriately
- baiUrlTemplate is unnecessary if your bai file is just your bam file with .bai added onto the end, in that case it is found automatically
排序
1 | samtools view KL_3d_clean_filter.xRNAs.bam | less |
bam生成配置文件
1 | # 对样品生成 json 文件 |
1 | # 查看帮助,有各项参数的意思 |
发现了 Cclementina Jbrowse
–out
Data directory to process. Default ‘data/‘.
1 | # 建立索引,搜索 |
http://10.164.6.4/index.html?data=Ccle
1 | # 生成bam的配置文件。配置文件中的路径只能写相对路径。要把文件移到相应的文件夹下 |
wig to bigwig
1 | conda install -c bioconda ucsc-wigtobigwig |
现在我用conda安装软件,总是会碰到perssion denied的问题。明天再搞了。
(base) [qi@localhost Ccle]$ ls ../bin
add-bam-track.pl add-json.pl biodb-to-json.pl draw-basepair-track.pl generate-names.pl json2conf.pl new-plugin.pl remove-track.pl
add-bw-track.pl add-track-json.pl cpanm flatfile-to-json.pl jbdoc maker2jbrowse prepare-refseqs.pl ucsc-to-json.pl