Skip to content
Pierre Lindenbaum edited this page Jan 31, 2017 · 3 revisions

##Motivation

Sliding Window : discriminate partial and fully contained fragments (from a bam file) see https://www.biostars.org/p/234230/

##Compilation

Requirements / Dependencies

Download and Compile

$ git clone "https://github.com/lindenb/jvarkit.git"
$ cd jvarkit
$ make biostar234230

by default, the libraries are not included in the jar file, so you shouldn't move them (https://github.com/lindenb/jvarkit/issues/15#issuecomment-140099011 ). You can create a bigger but standalone executable jar by adding standalone=yes on the command line:

$ git clone "https://github.com/lindenb/jvarkit.git"
$ cd jvarkit
$ make biostar234230 standalone=yes

The required libraries will be downloaded and installed in the dist directory.

edit 'local.mk' (optional)

The a file local.mk can be created edited to override/add some definitions.

For example it can be used to set the HTTP proxy:

http.proxy.host=your.host.com
http.proxy.port=124567

##Synopsis

$ java -jar dist/biostar234230.jar  [options] (stdin|file.bam|file.sam) 

Options

  • -o|--output (OUTPUT-FILE) Output file. Default:stdout.
  • -w|--winsize (VALUE) Window size Default value : "100".
  • -s|--winshift (VALUE) Shift each window by 's' bases Default value : "50".
  • -h|--help print help
  • -version|--version show version and exit

##Source Code

Main code is: https://github.com/lindenb/jvarkit/blob/master/src/main/java/com/github/lindenb/jvarkit/tools/biostar/Biostar234230.java

Example:

$ curl -s "ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/working/20110915_CEUtrio_b37_decoy_alignment/CEUTrio.HiSeq.WGS.b37_decoy.NA12892.clean.dedup.recal.bam" |  java -jar dist/biostar234230.jar 
#contig	start	end	pairs_in_window	pairs_over_window	pairs_partial_overlap
1	10000	10100	0	2	240
1	10050	10150	4	615	274
1	10100	10200	0	800	276
1	10150	10250	0	216	649
1	10200	10300	0	2982	809
1	10250	10350	0	2918	207
1	10300	10400	0	1923	2851
1	10350	10450	0	227	4498
1	10400	10500	0	31	1971
(...)

Contribute

License

The project is licensed under the MIT license.

Citing

Should you cite biostar234230 ? https://github.com/mr-c/shouldacite/blob/master/should-I-cite-this-software.md

The current reference is:

http://dx.doi.org/10.6084/m9.figshare.1425030

Lindenbaum, Pierre (2015): JVarkit: java-based utilities for Bioinformatics. figshare. http://dx.doi.org/10.6084/m9.figshare.1425030

Clone this wiki locally