@@ -115,24 +115,29 @@ check_if_int("snp_distance_up",config)
115115rule find_catchment :
116116 input :
117117 fasta = rules .seq_brownie .output .fasta
118+ params :
119+ background = config ["background_search_file" ],
120+ ref = config ["reference_sequence" ],
121+ up = config ["snp_distance_up" ],
122+ down = config ["snp_distance_down" ],
123+ side = config ["snp_distance_side" ],
124+ ids = config ["ids" ]
118125 log : os .path .join (config [KEY_TEMPDIR ],"logs" ,"updown_top_ranking.txt" )
119126 output :
120- txt = os .path .join (config [KEY_TEMPDIR ],"updown_ignore.txt" ),
121127 catchments = os .path .join (config [KEY_TEMPDIR ],"catchments.csv" )
122- run :
123-
124- shell (f"cp { config [KEY_IDS ]} '{ output .txt } '" )
125- shell ("""gofasta updown topranking \
128+ shell :
129+ """
130+ gofasta updown topranking \
126131 -q {input.fasta:q} \
127- -t '{config[background_search_file] }' \
132+ -t '{params.background }' \
128133 -o {output.catchments:q} \
129- --reference '{config[reference_sequence] }' \
134+ --reference '{params.ref }' \
130135 --dist-push \
131- --dist-up {config[snp_distance_up] } \
132- --dist-down {config[snp_distance_down] } \
133- --dist-side {config[snp_distance_side] } \
134- --ignore {output.txt:q } &> {log:q}
135- """ )
136+ --dist-up {params.up } \
137+ --dist-down {params.down } \
138+ --dist-side {params.side } \
139+ --ignore {params.ids } &> {log:q}
140+ """
136141
137142rule merge_catchments :
138143 input :
0 commit comments