[med-svn] [Git][med-team/mcaller][master] Fixed pickles 2->3 transition (as suggested by Yaroslav)
Steffen Möller
gitlab at salsa.debian.org
Sat Sep 5 21:57:38 BST 2020
Steffen Möller pushed to branch master at Debian Med / mcaller
Commits:
5116e888 by Steffen Möller at 2020-09-05T22:57:27+02:00
Fixed pickles 2->3 transition (as suggested by Yaroslav)
- - - - -
4 changed files:
- debian/changelog
- + debian/patches/pickl3latin.patch
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -2,35 +2,9 @@ mcaller (0.3+git20200621.90f6389-1) UNRELEASED; urgency=medium
* Initial release (Closes: #969558)
- BLOCKER:
-
- $ ./mCaller.py -p testdata/test_positions_A.txt -r testdata/pb_ecoli_polished_assembly.fasta -e testdata/masonread1.eventalign.tsv -d r95_twobase_model_NN_6_m6A.pkl -f testdata/masonread1.fastq
- testdata/
- 1 contigs
- 1 threads
- Traceback (most recent call last):
- File "./mCaller.py", line 188, in <module>
- main()
- File "./mCaller.py", line 184, in main
- distribute_threads(args.positions,args.motif,args.tsv,read2qual,args.reference,num_refs,base,mod,args.threads,args.num_variables,
- File "./mCaller.py", line 59, in distribute_threads
- extract_features(tsvname,refname,read2qual,nvariables,skip_thresh,qual_thresh,modelfile,classifier,0,endline=bytesize,train=train,pos_label=training_pos_dict,base=base,motif=motif,positions_list=positions_list)
- File "/home/moeller/git/med-team/mcaller/mcaller-0.0/extract_contexts.py", line 123, in extract_features
- model = pickle.load(modfi)
- UnicodeDecodeError: 'ascii' codec can't decode byte 0xb9 in position 1: ordinal not in range(128)
- moeller at steffen-laptop-debian:~/git/med-team/mcaller/mcaller-0.0$ ./mCaller.py -p testdata/test_positions_m6A.txt -r testdata/pb_ecoli_polished_assembly.fasta -e testdata/masonread1.eventalign.tsv -d r95_twobase_model_NN_6_m6A.pkl -f testdata/masonread1.fastq
- testdata/
- 1 contigs
- 1 threads
- Traceback (most recent call last):
- File "./mCaller.py", line 188, in <module>
- main()
- File "./mCaller.py", line 184, in main
- distribute_threads(args.positions,args.motif,args.tsv,read2qual,args.reference,num_refs,base,mod,args.threads,args.num_variables,
- File "./mCaller.py", line 59, in distribute_threads
- extract_features(tsvname,refname,read2qual,nvariables,skip_thresh,qual_thresh,modelfile,classifier,0,endline=bytesize,train=train,pos_label=training_pos_dict,base=base,motif=motif,positions_list=positions_list)
- File "/home/moeller/git/med-team/mcaller/mcaller-0.0/extract_contexts.py", line 123, in extract_features
- model = pickle.load(modfi)
- UnicodeDecodeError: 'ascii' codec can't decode byte 0xb9 in position 1: ordinal not in range(128)
+ BLOCKER:
+ - installation should be done properly - needs setup.py ?!?
+ - .py in executables (secondary)
+ - README and test files does seem to be in sync with current code.
-- Steffen Moeller <moeller at debian.org> Fri, 04 Sep 2020 22:28:05 +0200
=====================================
debian/patches/pickl3latin.patch
=====================================
@@ -0,0 +1,13 @@
+Index: mcaller/extract_contexts.py
+===================================================================
+--- mcaller.orig/extract_contexts.py
++++ mcaller/extract_contexts.py
+@@ -120,7 +120,7 @@ def extract_features(tsv_input,fasta_inp
+ if not train:
+ tsv_output = '.'.join(tsv_input.split('.')[:-1])+'.diffs.'+str(k)+'.tmp'+str(startline)
+ modfi = open(modelfile,'rb')
+- model = pickle.load(modfi)
++ model = pickle.load(modfi,encoding="latin1")
+ modfi.close()
+ if type(model) != dict:
+ model = {'general':model} #for compatibility with previously trained model
=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
shebang.patch
python2to3.patch
+pickl3latin.patch
=====================================
debian/rules
=====================================
@@ -10,5 +10,13 @@ include /usr/share/dpkg/default.mk
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ ./mCaller.py -p testdata/test_positions_A.txt -r testdata/pb_ecoli_polished_assembly.fasta -e testdata/masonread1.eventalign.tsv -d r95_twobase_model_NN_6_m6A.pkl -f testdata/masonread1.fastq
+ ./mCaller.py -p testdata/test_positions_m6A.txt -r testdata/pb_ecoli_polished_assembly.fasta -e testdata/masonread1.eventalign.tsv -d r95_twobase_model_NN_6_m6A.pkl -f testdata/masonread1.fastq
+ #./make_bed.py -f testdata/masonread1.eventalign.diffs.6 -d 1 -m 0.5
./mCaller.py -p testdata/test_positions.txt -r testdata/pb_ecoli_polished_assembly.fasta -e testdata/masonread1.eventalign.tsv -t 4 --train -f testdata/masonread1.fastq
endif
+
+override_dh_auto_clean:
+ dh_auto_clean
+ rm -f model_NN_6_m6A.pkl
+ rm -rf __pycache__
View it on GitLab: https://salsa.debian.org/med-team/mcaller/-/commit/5116e888737a0c7c7e949822a115c456f7a31abd
--
View it on GitLab: https://salsa.debian.org/med-team/mcaller/-/commit/5116e888737a0c7c7e949822a115c456f7a31abd
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200905/681e1e7f/attachment-0001.html>
More information about the debian-med-commit
mailing list