forked from widdowquinn/ncfp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
105 lines (86 loc) · 3.37 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Makefile
#
# This file is part of the ncfp package distribution
# (https://github.com/widdowquinn/ncfp)
# Set up all development dependencies in the current conda environment
setup_env:
@conda install --file requirements-dev.txt --yes
@conda install --file requirements.txt --yes
@pip install -r requirements-pip.txt
@pre-commit install
@pip install -U -e .
# Run all tests and display coverage report in a browser
test:
@pytest --cov-report=html --cov=ncbi_cds_from_protein -v tests/ && open htmlcov/index.html
# Build and display documentation
docs: clean_docs uml
@cd docs && make html && open _build/html/index.html
uml:
pyreverse -o pdf -p ncbi_cds_from_protein ncbi_cds_from_protein
# Clean up outputs
clean: clean_docs clean_tests clean_examples
clean_docs:
@rm -rf docs/_build/html && \
rm -rf classes_ncbi_cds_From_protein.pdf && \
rm -rf packages_ncbi_cds_From_protein.pdf
# Run examples from documentation
examples:
# NCBI no introns
# test_basic_ncbi()
@ncfp tests/fixtures/sequences/input_ncbi.fasta \
tests/fixtures/targets/ncbi dev@null.com -v
# NCBI alternative starts
# test_alternative_start()
@ncfp --allow_alternative_start_codon \
tests/fixtures/sequences/input_alternative_start.fasta \
tests/fixtures/targets/alternative_start dev@null.com -v
# Sequence with ambiguous UniProt GN field
# test_ambiguous()
@ncfp -s tests/fixtures/sequences/input_ambiguous.fasta \
tests/fixtures/targets/ambiguous dev@null.com -v
# NCBI/Stockholm
# test_ncbi_stockholm()
@ncfp -s \
tests/fixtures/sequences/input_ncbi_stockholm.fasta \
tests/fixtures/targets/ncbi_stockholm dev@null.com -v
# UniProt no introns
# test_basic_uniprot
@ncfp tests/fixtures/sequences/input_uniprot.fasta \
tests/fixtures/targets/basic_uniprot dev@null.com -v
# test_small_stockholm()
@ncfp -s tests/fixtures/sequences/input_uniprot_stockholm_small.fasta \
tests/fixtures/targets/small_stockholm dev@null.com -v
# UniProt/Stockholm no introns
@ncfp -s tests/fixtures/sequences/input_uniprot_stockholm.fasta \
tests/fixtures/targets/uniprot_stockholm dev@null.com -v
# UniProt/Stockholm small no introns, unified seqID
@ncfp -s --unify_seqid \
tests/fixtures/sequences/input_uniprot_stockholm_small.fasta \
tests/fixtures/targets/small_stockholm_unified/ dev@null.com -v
# UniProt/Stockholm small no introns, use protein_id field
@ncfp -s --use_protein_id \
tests/fixtures/sequences/input_uniprot_stockholm_small.fasta \
tests/fixtures/targets/small_stockholm_use_proteinid/ dev@null.com -v
# Human isoforms/intron-exon
@ncfp tests/fixtures/sequences/human.fasta \
tests/fixtures/targets/human dev@null.com -v
# Logging
@ncfp tests/fixtures/sequences/human.fasta \
tests/fixtures/targets/logging dev@null.com \
-l tests/fixtures/targets/logging/human.log
# Cache location
@ncfp tests/fixtures/sequences/human.fasta \
tests/fixtures/targets/caches dev@null.com \
-d tests/fixtures/targets/caches \
-c ncfp_cache
# Cache reuse
@ncfp tests/fixtures/sequences/human.fasta \
tests/fixtures/targets/caches1 dev@null.com \
-d tests/fixtures/targets/caches \
-c ncfp_cache
@ncfp tests/fixtures/sequences/human.fasta \
tests/fixtures/targets/caches2 dev@null.com \
-d tests/fixtures/targets/caches \
-c ncfp_cache \
--filestem cached \
--keepcache