Skip to main content

Python wrapper for the bwtool library.

Project description

Travis CI build SonarCloud Quality SonarCloud Maintainability Codacy Maintainability Maintainability Pypi project Pypi total project downloads

Python wrapper for the bwtool library. Please take a look to the bwtool wiki for notes on the installation process and to the known issues listed below within this readme.

How do I install this package?

As usual, just download it using pip:

pip install pybwtool

Tests Coverage

Since some software handling coverages sometime get slightly different results, here’s three of them:

Coveralls Coverage SonarCloud Coverage Code Climate Coverate

Extract

The extract method returns a tuple of pandas Dataframes with the data from the regions of a bed file extracted from the given bigwig.

from pybwtool import extract

bed, scores = extract(
    bed_path="path/to/my/bed_file.bed",
    bigwig_path="path/to/my/bigwig_file.bigwig",
    nan_threshold=0.95 # maximum amount of NaN to allow, otherwise the line is dropped
)

The obtained dataframes look as follows:

chr11

14606206

14606406

chr11:14606206-14606406

200

chr1

1336296

1336496

chr1:1336296-1336496

200

chr11

47745644

47745844

chr11:47745644-47745844

200

chr11

62609072

62609272

chr11:62609072-62609272

200

chr14

21523971

21524171

chr14:21523971-21524171

200

0.22

0.22

0.21

0.22

0.21

0.22

0.24

0.25

0.28

0.28

0.26

0.26

0.26

0.26

0.26

0.31

0.31

0.31

0.32

0.33

0.33

0.33

0.32

0.35

0.36

0.36

0.36

0.36

0.36

0.36

0.37

0.37

0.36

0.37

0.37

0.37

0.36

0.32

0.32

0.32

0.33

0.33

0.33

0.33

0.35

0.35

0.35

0.35

0.35

0.35

0.36

0.39

0.39

0.37

0.37

0.36

0.35

0.33

0.31

0.31

0.29

0.29

0.29

0.29

0.29

0.25

0.24

0.28

0.26

0.25

0.25

0.25

0.24

0.19

0.18

0.18

0.17

0.17

0.18

0.19

0.18

0.18

0.18

0.17

0.18

0.18

0.18

0.18

0.18

0.18

0.17

0.24

0.25

0.25

0.24

0.22

0.22

0.25

0.25

0.25

0.24

0.21

0.22

0.22

0.22

0.22

0.22

0.22

0.22

0.24

0.24

0.24

0.26

0.26

0.26

0.26

0.26

0.22

0.22

0.22

0.22

0.22

0.22

0.22

0.22

0.21

0.21

0.21

0.19

0.19

0.19

0.22

0.22

0.22

0.22

0.24

0.25

0.25

0.26

0.26

0.26

0.19

0.18

0.18

0.18

0.18

0.18

0.15

0.15

0.15

0.15

0.15

0.17

0.17

0.17

0.17

0.17

0.17

0.18

0.17

0.17

0.17

0.14

0.14

0.14

0.14

0.14

0.14

0.14

0.14

0.14

0.17

0.17

0.17

0.17

0.17

0.18

0.18

0.18

0.18

0.18

0.15

0.15

0.15

0.14

0.12

0.11

0.12

0.11

0.11

0.11

0.11

0.11

0.11

0.11

0.11

0.11

0.11

0.11

0.11

1.25

1.26

1.32

1.43

1.42

1.36

1.36

1.37

1.37

1.32

1.31

1.31

1.35

1.35

1.43

1.5

1.56

1.56

1.64

1.67

1.67

1.64

1.68

1.67

1.68

1.69

1.71

1.71

1.74

1.71

1.67

1.65

1.58

1.56

1.43

1.36

1.24

1.24

1.28

1.26

1.33

1.36

1.44

1.42

1.44

1.46

1.5

1.49

1.47

1.47

1.54

1.54

1.54

1.47

1.49

1.53

1.51

1.5

1.51

1.57

1.57

1.57

1.53

1.54

1.49

1.46

1.43

1.43

1.39

1.39

1.4

1.42

1.39

1.37

1.37

1.4

1.4

1.43

1.4

1.42

1.44

1.44

1.4

1.37

1.36

1.32

1.29

1.31

1.29

1.29

1.19

1.24

1.19

1.19

1.25

1.24

1.26

1.28

1.26

1.37

1.33

1.33

1.28

1.24

1.25

1.25

1.25

1.26

1.24

1.22

1.28

1.28

1.32

1.37

1.39

1.36

1.32

1.31

1.36

1.33

1.5

1.5

1.5

1.5

1.5

1.47

1.46

1.49

1.57

1.58

1.58

1.62

1.64

1.64

1.67

1.67

1.68

1.74

1.81

1.93

1.93

1.87

1.85

1.83

1.76

1.76

1.72

1.75

1.92

1.83

1.82

1.79

1.85

1.86

1.83

1.83

1.82

1.81

1.89

1.89

1.92

1.93

1.96

1.92

1.86

1.86

1.86

1.93

1.87

1.85

1.72

1.71

1.71

1.72

1.75

1.81

1.82

1.75

1.71

1.67

1.68

1.65

1.65

1.65

1.67

1.69

1.75

1.64

1.57

1.44

1.6

1.69

1.68

1.72

1.69

1.71

1.67

1.64

1.49

1.46

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.03

0.03

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.03

0.03

0.03

0.03

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.04

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.01

0.01

0.01

0.01

0.03

0.03

0.03

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.01

0.01

0.01

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.04

0.15

0.17

0.17

0.17

0.17

0.17

0.17

0.17

0.17

0.15

0.14

0.17

0.18

0.18

0.18

0.18

0.18

0.19

0.19

0.19

0.19

0.21

0.21

0.21

0.19

0.21

0.22

0.22

0.24

0.24

0.24

0.24

0.24

0.22

0.22

0.22

0.22

0.22

0.25

0.25

0.25

0.26

0.26

0.28

0.28

0.29

0.25

0.25

0.24

0.22

0.22

0.21

0.21

0.21

0.21

0.21

0.19

0.21

0.21

0.21

0.01

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

nan

0.01

0.01

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.06

0.06

0.06

0.06

0.06

0.06

0.06

0.06

0.06

0.06

0.06

0.06

0.06

0.06

0.06

0.06

0.06

0.06

0.04

0.04

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.03

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.04

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.01

0.03

0.03

0.03

0.03

0.03

0.01

0.31

0.25

0.21

0.19

0.19

0.19

0.19

0.18

0.19

0.21

0.21

0.21

0.21

0.22

0.26

0.26

0.26

0.26

0.29

0.28

0.26

0.26

0.26

0.26

0.28

0.26

0.24

0.24

0.22

0.24

0.25

0.25

0.25

0.26

0.29

0.28

0.28

0.28

0.29

0.29

0.29

0.29

0.29

0.29

0.25

0.25

0.25

0.25

0.26

0.26

0.26

0.26

0.26

0.26

0.26

0.26

0.28

0.28

0.26

0.26

0.26

0.26

0.25

0.24

0.19

0.19

0.19

0.19

0.17

0.17

0.17

0.17

0.17

0.15

0.14

0.15

0.15

0.15

0.18

0.17

0.15

0.15

0.15

0.12

0.11

0.12

0.14

0.14

0.14

0.15

0.17

0.17

0.17

0.17

0.17

0.18

0.18

0.18

0.17

0.17

0.17

0.17

0.18

0.18

0.18

0.18

0.17

0.17

0.18

0.17

0.18

0.18

0.18

0.18

0.19

0.19

0.21

0.21

0.22

0.22

0.22

0.22

0.22

0.22

0.22

0.21

0.21

0.22

0.21

0.21

0.21

0.21

0.21

0.21

0.21

0.19

0.18

0.18

0.17

0.15

0.15

0.15

0.15

0.15

0.15

0.14

0.14

0.14

0.14

0.14

0.17

0.18

0.17

0.17

0.17

0.17

0.17

0.17

0.15

0.15

0.14

0.14

0.14

0.14

0.12

0.12

0.11

0.11

0.1

0.1

0.1

0.1

0.1

0.1

0.12

0.12

0.12

0.12

0.11

0.11

0.12

0.12

0.12

0.12

0.12

0.12

0.12

0.12

0.12

0.14

0.12

0.14

0.15

0.15

0.15

0.15

0.17

0.17

0.17

0.17

Common fixes for getting bwtool to work

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pybwtool-1.0.2.tar.gz (8.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page