|
rule finalMafToSam: |
| input : MAF="all_maf/all.maf" |
| output: temp("all_sam/all.sam") |
| params: sge_opts=config["cluster_settings"]["light"] |
| shell: "maf-convert sam {input.MAF} > {output}" |
|
|
| rule finalAxtToMaf: |
| input: AX="all_axt/all_filt_no_class.axt", TS="stats/target.sizes", QS="stats/query.sizes" |
| output: temp("all_maf/all.maf") |
| params: sge_opts=config["cluster_settings"]["light"] |
| shell: "axtToMaf {input.AX} {input.TS} {input.QS} {output}" |
|
|
| rule netToAxt: |
| input: NET="net/all-no-class.net", CHAIN="merged_chains/all.chain.filter.prenet.chain", TA2="2bits/target.2bit", QU2="2bits/query.2bit" |
| output: temp("all_axt/all_filt_no_class.axt") |
| params: sge_opts=config["cluster_settings"]["light"] |
| shell: "netToAxt {input.NET} {input.CHAIN} {input.TA2} {input.QU2} {output}" |
|
|
| rule filtNet: |
| input: "net/all-no-class.net" |
| output: "filt_net/all-no-class.filt.net" |
| params: sge_opts=config["cluster_settings"]["light"] |
| shell: "netFilter -chimpSyn {input} > {output} && netToBed {output} filt_net/all-no-class-filter.bed" |
|
|
| rule net: |
| input: CHAIN="merged_chains/all.chain.filter.prenet.chain", TS="stats/target.sizes", QS="stats/query.sizes" |
| output: "net/all-no-class.net" |
| params: sge_opts=config["cluster_settings"]["light"] |
| shell: "chainNet {input.CHAIN} -minSpace=1 {input.TS} {input.QS} stdout /dev/null | netSyntenic stdin {output}" |
|
|
| rule filter: |
| input: CHAINS="merged_chains/all.chain", TS="stats/target.sizes", QS="stats/query.sizes" |
| params: sge_opts=config["cluster_settings"]["light"] |
| output: "merged_chains/all.chain.filter.prenet.chain" |
| shell: "chainPreNet {input.CHAINS} {input.TS} {input.QS} {output}" |
|
|
| rule merge: |
| input: expand("chained_psl/{contig}.chained.psl", contig=REGIONS) |
| output: "merged_chains/all.chain" |
| params: sge_opts=config["cluster_settings"]["light"] |
| shell: "chainMergeSort {input} > {output}" |
|
|
| rule chain: |
| input: PSL="raw_psl/{contig}.psl", T2BIT="2bits/target.2bit", Q2BIT="2bits/query.2bit" |
| output: temp("chained_psl/{contig}.chained.psl") |
| params: sge_opts=config["cluster_settings"]["light"] |
| shell: "axtChain -linearGap=medium -psl {input.PSL} {input.T2BIT} {input.Q2BIT} {output}" |
|
|
| rule lav_to_psl: |
| input: "raw_lav/{contig}.lav" |
| output: "raw_psl/{contig}.psl" |
| params: sge_opts="-l mfree=10G -l h_rt=24:00:00 -q eichler-short.q" |
| shell: "lavToPsl {input} {output}" |
|
|
| rule runLastZ: |
| input: T={TARGET}, Q={QUERY} |
| output: "raw_lav/{contig}.lav" |
| params: sge_opts=config["cluster_settings"]["heaviest"] |
| shell: "{RS_LT} ; {RS_LQ} ; {RS_LTI} ; {RS_LQI} ; {FAIDX} {wildcards.contig} > $TMPDIR/q.fasta ; {LZ} $TMPDIR/q.fasta {LQ} {POST} > {output}" |
|