Commit 62723ea1 authored by khalid's avatar khalid
Browse files

check if reads are genomic or Rna before calling hisat2 with pair-end params

parent 82a1e0c1
......@@ -141,6 +141,7 @@ speciesData = snakemake@params[["biomaRtDataset"]]
#what if we have tarnscript ID or not ENSEMBL ID instead of gene ID ?????????
if we know speciesData make a blast
if (speciesData != "None") {
# Add annotation with biomaRt
library(biomaRt)
......@@ -175,7 +176,8 @@ if (speciesData != "None") {
user_threshold = 0.05, correction_method = "g_SCS",
domain_scope = "annotated", custom_bg = NULL,
numeric_ns = "", sources = sources, as_short_link = FALSE)
if ( nrow(gostres$result) > 1) # we have some results
{
png(filename = paste0(snakemake@params[["outDir"]],"/gprofiler2_plot_mqc.png"), height=800, width=800)
p <- gostplot(gostres, capped = FALSE, interactive = FALSE)
print(p + ggtitle("gprofiler2 enrichment analysis for top genes to find over-representation of terms from Gene Ontology"))
......@@ -188,7 +190,7 @@ if (speciesData != "None") {
ttable = cbind(1:nrow(gostres$result), gostres$result[,-14])
colnames(ttable)[1]="id"
write.table(ttable, paste0(snakemake@params[["outDir"]],"/gprofiler2_mqc.tsv"), sep="\t",row.names =FALSE, quote = FALSE)
}
}
......@@ -62,7 +62,7 @@
Mus musculus: "mmusculus_gene_ensembl",
Homo sapiens: "hsapiens_gene_ensembl",
Nile tilapia: "oniloticus_gene_ensembl",
oniloticus_gene_ensembl: "dmelanogaster_gene_ensembl"
Drosophila melanogaster: "dmelanogaster_gene_ensembl"
],
value: "None",
label: "Species"
......
......@@ -11,7 +11,7 @@ if config["SeOrPe"] == "PE":
params:
command = config["<step_name>__fastp_PE_command"],
complexity_threshold = config["<step_name>__fastp_complexity_threshold"],
report_title = config["<step_name>__fastp_report_title"]+" : "+{sample},
report_title = config["<step_name>__fastp_report_title"]+" : {sample}",
detect_adapter_for_pe = "--detect_adapter_for_pe" if config["<step_name>__fastp_adapter_detection_PE"] == True else "",
adapter_sequence = "--adapter_sequence "+config["<step_name>__fastp_adapter_sequence"] if config["<step_name>__fastp_adapter_sequence"] != "" else "",
adapter_sequence_R2 = "--adapter_sequence_r2 " + config["<step_name>__fastp_adapter_sequence_R2_PE"] if config["<step_name>__fastp_adapter_sequence_R2_PE"] != "" else "",
......
......@@ -14,15 +14,15 @@ if config["SeOrPe"] == "PE":
#indexPrefix = config["<step_name>__hisat2_index_output_dir"]+"/index",
#here we have index files : from .1.ht2 to .8.ht2
indexPrefix = lambda w, input: os.path.splitext(os.path.splitext([x for x in input.index ][0])[0])[0],
minins = config["<step_name>__hisat2_minins_PE"],
maxins = config["<step_name>__hisat2_maxins_PE"],
minins = "-I " + config["<step_name>__hisat2_minins_PE"] if config["<step_name>__hisat2_reads_type"] == "genome" else "",
maxins = "-X " + config["<step_name>__hisat2_maxins_PE"] if config["<step_name>__hisat2_reads_type"] == "genome" else "",
orientation = config["<step_name>__hisat2_orientation_PE"],
shell:
"{params.command} --new-summary "
"--threads {threads} "
"-x {params.indexPrefix} "
"-I {params.minins} "
"-X {params.maxins} "
"{params.minins} "
"{params.maxins} "
"{params.orientation} "
"--rg-id ID:WAW --rg SM:{wildcards.sample} "
#"-S "#output in sam format
......
......@@ -30,6 +30,13 @@
step: 1,
label: "Number of threads to use to align reads",
},
{
name: templatelen-adjustment,
prefix: --no-templatelen-adjustment,
type: "checkbox",
value: TRUE,
label: Disables template length adjustment for RNA-seq reads,
}
{
name: hisat2_minins_PE,
prefix: -I,
......
Markdown is supported
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