SATAY-LL / LaanLab-SATAY-DataAnalysis

This contains codes and workflows for data analysis regarding SATAY experiments.
Apache License 2.0
4 stars 3 forks source link

Test transposonmapper #70

Closed leilaicruz closed 3 years ago

leilaicruz commented 3 years ago

I did not know you were also working in this branch .. I kind of merge already then your changes , a lot of progress you made! lets look at them on our next session

I am this week kind of complicated with the carpentry training ..

mwakok commented 3 years ago

Yes, sorry, I though we would continue adding tests and refactor code in this branch. Anyway, we should discuss the pull request during our next meeting as I have for example replaced your original bam_loading file, which you might now rely on.

Also, as the data_files are now included in the Python package (as defined in setup.py) you can find the path (and files) using the library pkg_resources. For example, you can find the path to the datafiles with

import pkg_resources
data_path = pkg_resources.resource_filename("satay", "data_files/")

This way, you don't need to worry about relative or absolute paths as the data is included with the satay pip install.

I will continue working in this branch and thus add to the PR. Make sure that you update your local branch whenever you work on it yourself. I will only create new python scripts and tests, but not change the code in transposon-mapping_satay.py before we create an integration test to ensure the script keeps working.

leilaicruz commented 3 years ago

I have for example replaced your original bam_loading file, which you might now rely on

It is OK , one of the changes I made is to dont use this file , but as an output of a function...

you can find the path (and files) using the library pkg_resources

This is great! thanks

Make sure that you update your local branch whenever you work on it yourself.

Yes! you as well since we are both working here.

leilaicruz commented 3 years ago

it is failing now , because he needs the .bam file from the test dataset , but since it is in .gitignore , github is not able to see it and give an error , but locally the test has passed . You can run it locally with that dataset.

I also included pysam in the setup since it is required to run the transposonmapper for the tests.