Skip to content

Commit d57c7f9

Browse files
authored
parameter setting
1 parent 332d889 commit d57c7f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CLAM/permutation_peakcaller.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def parser(args):
6565
assert len(args.in_bam)==2
6666
tid_to_qval_compact = pool.map(
6767
_child_get_permutation_fdr,
68-
[ (unibam_file, multibam_file, child_gene_list[i], gene_annot, args.qval_cutoff, max_iter, ~(args.unstranded=='unstranded'), 'fdr', random_state)
68+
[ (unibam_file, multibam_file, child_gene_list[i], gene_annot, args.qval_cutoff, max_iter, ~(args.lib_type=='unstranded'), 'fdr', random_state)
6969
for i in range(args.nthread)
7070
])
7171

@@ -75,7 +75,7 @@ def parser(args):
7575
unique_tid_to_qval, combined_tid_to_qval = unpack_tid_to_qval(tid_to_qval_compact)
7676
else:
7777
unique_tid_to_qval, combined_tid_to_qval = _child_get_permutation_fdr(
78-
(unibam_file, multibam_file, gene_list, gene_annot, args.qval_cutoff, max_iter, ~(args.unstranded=='unstranded'), 'fdr', random_state)
78+
(unibam_file, multibam_file, gene_list, gene_annot, args.qval_cutoff, max_iter, ~(args.lib_type=='unstranded'), 'fdr', random_state)
7979
)
8080

8181
#pickle.dump(unique_tid_to_qval, open(tmp_dir+'/unique_to_qval.pdata','wb'), -1)
@@ -119,7 +119,7 @@ def parser(args):
119119
_, signal_qval, gene_name = peak
120120
signal, qval = signal_qval
121121
f.write( narrowPeak_formatter % (chr, start, end, gene_name, 'combined', strand, signal, qval) )
122-
if args.unstranded:
122+
if args.lib_type=='unstranded':
123123
cmd = ''' sort -k1,1 -k2,2n %s/all_permutation_peaks.bed |awk '{OFS="\t"; print $1,$2,$3,$4":"$7":"$9,$5,$6}'| bedtools merge -d -1 -i stdin -c 4,5,6 -o collapse,collapse,distinct > %s''' % (output_dir, os.path.join(output_dir,'narrow_peak.permutation.bed') )
124124
else:
125125
cmd = ''' sort -k1,1 -k2,2n %s/all_permutation_peaks.bed |awk '{OFS="\t"; print $1,$2,$3,$4":"$7":"$9,$5,$6}'| bedtools merge -s -d -1 -i stdin -c 4,5,6 -o collapse,collapse,distinct > %s''' % (output_dir, os.path.join(output_dir,'narrow_peak.permutation.bed') )

0 commit comments

Comments
 (0)