Commit f6ff4000 authored by Blaise Li's avatar Blaise Li
Browse files

Trying to use libreads for id conversions.

parent e10a0af2
......@@ -541,14 +541,15 @@ rule feature_count_reads:
err = OPJ(log_dir, "{trimmer}", "feature_count_reads", "{lib}_{rep}_{read_type}.err")
shell:
"""
converter="/pasteur/entites/Mhe/Genomes/C_elegans/Caenorhabditis_elegans/Ensembl/WBcel235/Annotation/Genes/genes_id2name.pickle"
# converter="/pasteur/entites/Mhe/Genomes/C_elegans/Caenorhabditis_elegans/Ensembl/WBcel235/Annotation/Genes/genes_id2name.pickle"
tmpdir=$(mktemp -dt "feature_{wildcards.lib}_{wildcards.rep}_{wildcards.read_type}_{wildcards.biotype}_{wildcards.orientation}.XXXXXXXXXX")
cmd="featureCounts -a {params.annot} -o {output.counts} -t transcript -g "gene_id" -O -M --primary -s {params.stranded} --fracOverlap 0 --tmpDir ${{tmpdir}} {input.sorted_bam}"
featureCounts -v 2> {log.log}
echo ${{cmd}} 1>> {log.log}
eval ${{cmd}} 1>> {log.log} 2> {log.err} || error_exit "featureCounts failed"
rm -rf ${{tmpdir}}
cat {output.counts} | id2name.py ${{converter}} > {output.counts_converted}
cat {output.counts} | wormid2name > {output.counts_converted}
# cat {output.counts} | id2name.py ${{converter}} > {output.counts_converted}
"""
......
......@@ -3,3 +3,5 @@ pandas
libhts @ git+https://bioinfo_utils:DP-sqNot8AdsMek_KJiC@gitlab.pasteur.fr/bli/libhts.git
libworkflows @ git+https://bioinfo_utils:tfuTQsSZWMtC5xXJNFJh@gitlab.pasteur.fr/bli/libworkflows.git
snakemake_wrappers @ git+https://bioinfo_utils:Ues9rP1tyfzs1zs5BzpY@gitlab.pasteur.fr/bli/snakemake_wrappers.git
# extra dependencies for some rules
libcelegans @ git+https://bioinfo_utils:izoZHUvhFJU8689hqM5u@gitlab.pasteur.fr/bli/libcelegans.git
......@@ -227,7 +227,8 @@ rule feature_count_reads:
echo ${{cmd}} 1>> {log.log}
eval ${{cmd}} 1>> {log.log} 2> {log.err} || error_exit "featureCounts failed"
rm -rf ${{tmpdir}}
cat {output.counts} | id2name.py {params.converter} > {output.counts_converted}
cat {output.counts} | wormid2name {params.converter} > {output.counts_converted}
# cat {output.counts} | id2name.py {params.converter} > {output.counts_converted}
"""
......
......@@ -2,3 +2,5 @@ numpy
pandas
snakemake_wrappers @ git+https://bioinfo_utils:Ues9rP1tyfzs1zs5BzpY@gitlab.pasteur.fr/bli/snakemake_wrappers.git
libworkflows @ git+https://bioinfo_utils:tfuTQsSZWMtC5xXJNFJh@gitlab.pasteur.fr/bli/libworkflows.git
# extra dependencies for some rules
libcelegans @ git+https://bioinfo_utils:izoZHUvhFJU8689hqM5u@gitlab.pasteur.fr/bli/libcelegans.git
......@@ -703,7 +703,8 @@ rule feature_count_reads:
echo ${{cmd}} 1>> {log.log}
eval ${{cmd}} 1>> {log.log} 2> {log.err} || error_exit "featureCounts failed"
rm -rf ${{tmpdir}}
cat {output.counts} | id2name.py {params.converter} > {output.counts_converted}
cat {output.counts} | wormid2name > {output.counts_converted}
# cat {output.counts} | id2name.py {params.converter} > {output.counts_converted}
"""
......
......@@ -11,4 +11,5 @@ libhts @ git+https://bioinfo_utils:DP-sqNot8AdsMek_KJiC@gitlab.pasteur.fr/bli/li
libworkflows @ git+https://bioinfo_utils:tfuTQsSZWMtC5xXJNFJh@gitlab.pasteur.fr/bli/libworkflows.git
snakemake_wrappers @ git+https://bioinfo_utils:Ues9rP1tyfzs1zs5BzpY@gitlab.pasteur.fr/bli/snakemake_wrappers.git
# extra dependencies for some rules
libcelegans @ git+https://bioinfo_utils:izoZHUvhFJU8689hqM5u@gitlab.pasteur.fr/bli/libcelegans.git
deeptools
......@@ -895,7 +895,8 @@ rule feature_count_reads:
echo ${{cmd}} 1>> {log.log}
eval ${{cmd}} 1>> {log.log} 2> {log.err} || error_exit "featureCounts failed"
rm -rf ${{tmpdir}}
cat {output.counts} | id2name.py {params.converter} > {output.counts_converted}
cat {output.counts} | wormid2name > {output.counts_converted}
# cat {output.counts} | id2name.py {params.converter} > {output.counts_converted}
"""
......
......@@ -11,3 +11,5 @@ libdeseq @ git+https://bioinfo_utils:uqiFbzWyBtzxYn7br82P@gitlab.pasteur.fr/bli/
libhts @ git+https://bioinfo_utils:DP-sqNot8AdsMek_KJiC@gitlab.pasteur.fr/bli/libhts.git
libworkflows @ git+https://bioinfo_utils:tfuTQsSZWMtC5xXJNFJh@gitlab.pasteur.fr/bli/libworkflows.git
snakemake_wrappers @ git+https://bioinfo_utils:Ues9rP1tyfzs1zs5BzpY@gitlab.pasteur.fr/bli/snakemake_wrappers.git
# extra dependencies for some rules
libcelegans @ git+https://bioinfo_utils:izoZHUvhFJU8689hqM5u@gitlab.pasteur.fr/bli/libcelegans.git
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment