Previous changeset 9:6010786c9960 (2016-10-11) Next changeset 11:9dfd74fd363a (2016-10-11) |
Commit message:
Uploaded |
added:
alfa/ALFA/test-data/alfa_toy-Biofeatures Distribution.pdf alfa/ALFA/test-data/alfa_toy.bam alfa/ALFA/test-data/alfa_toy.bedgraph alfa/ALFA/test-data/alfa_toy.categories_counts alfa/ALFA/test-data/alfa_toy.gtf alfa/ALFA/test-data/alfa_toy.stranded.index alfa/ALFA/test-data/alfa_toy.unstranded.index alfa/ALFA/tool-data/alfa_genomes_indexes.loc.sample alfa/ALFA/tool_data_table_conf.xml.sample alfa/ALFA/tool_dependencies.xml alfa/ALFA/tools/alfa/ALFA.py alfa/ALFA/tools/alfa/alfa_wrapper.sh alfa/ALFA/tools/alfa/alfa_wrapper.xml |
removed:
ALFA/test-data/alfa_toy-Biofeatures Distribution.pdf ALFA/test-data/alfa_toy.bam ALFA/test-data/alfa_toy.bedgraph ALFA/test-data/alfa_toy.categories_counts ALFA/test-data/alfa_toy.gtf ALFA/test-data/alfa_toy.stranded.index ALFA/test-data/alfa_toy.unstranded.index ALFA/tool-data/alfa_genomes_indexes.loc.sample ALFA/tool_data_table_conf.xml.sample ALFA/tool_dependencies.xml ALFA/tools/alfa/ALFA.py ALFA/tools/alfa/alfa_wrapper.sh ALFA/tools/alfa/alfa_wrapper.xml |
b |
diff -r 6010786c9960 -r 86bc5c328db2 ALFA/test-data/alfa_toy-Biofeatures Distribution.pdf |
b |
Binary file ALFA/test-data/alfa_toy-Biofeatures Distribution.pdf has changed |
b |
diff -r 6010786c9960 -r 86bc5c328db2 ALFA/test-data/alfa_toy.bam |
b |
Binary file ALFA/test-data/alfa_toy.bam has changed |
b |
diff -r 6010786c9960 -r 86bc5c328db2 ALFA/test-data/alfa_toy.bedgraph --- a/ALFA/test-data/alfa_toy.bedgraph Tue Oct 11 06:52:56 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,4 +0,0 @@ -Chr1 149 199 2 -Chr1 299 349 1 -Chr1 499 549 6 -Chr1 1099 1149 1 |
b |
diff -r 6010786c9960 -r 86bc5c328db2 ALFA/test-data/alfa_toy.categories_counts --- a/ALFA/test-data/alfa_toy.categories_counts Tue Oct 11 06:52:56 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,5 +0,0 @@ -#Category,biotype Counts_in_bam Size_in_genome -CDS,protein_coding 300.0 624.0 -five_prime_utr,protein_coding 75.0 250.5 -three_prime_utr,protein_coding 25.0 126.5 -intergenic,intergenic 100.0 249.0 |
b |
diff -r 6010786c9960 -r 86bc5c328db2 ALFA/test-data/alfa_toy.gtf --- a/ALFA/test-data/alfa_toy.gtf Tue Oct 11 06:52:56 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,6 +0,0 @@ -Chr1 ensembl_havana gene 250 1250 . + . gene_id "ENSMUSG00000051951"; gene_biotype "protein_coding"; -Chr1 ensembl_havana transcript 250 1250 . + . gene_id "ENSMUSG00000051951"; gene_biotype "protein_coding"; -Chr1 ensembl_havana exon 375 1000 . + . gene_id "ENSMUSG00000051951"; gene_biotype "protein_coding"; -Chr1 ensembl_havana CDS 375 1000 . + 0 gene_id "ENSMUSG00000051951"; gene_biotype "protein_coding"; -Chr1 ensembl_havana five_prime_utr 250 375 . - . gene_id "ENSMUSG00000051951"; gene_biotype "protein_coding"; -Chr1 ensembl_havana three_prime_utr 1000 1250 . - . gene_id "ENSMUSG00000051951"; gene_biotype "protein_coding"; |
b |
diff -r 6010786c9960 -r 86bc5c328db2 ALFA/test-data/alfa_toy.stranded.index --- a/ALFA/test-data/alfa_toy.stranded.index Tue Oct 11 06:52:56 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,11 +0,0 @@ -#Chr1 1250 -Chr1 249 374 + protein_coding:gene,transcript -Chr1 249 374 - protein_coding:five_prime_utr -Chr1 374 375 + protein_coding:exon,CDS -Chr1 374 375 - protein_coding:five_prime_utr,three_prime_utr -Chr1 375 999 + protein_coding:exon,CDS -Chr1 375 999 - antisense -Chr1 999 1000 + protein_coding:exon,CDS -Chr1 999 1000 - protein_coding:three_prime_utr -Chr1 1000 1250 + protein_coding:gene,transcript -Chr1 1000 1250 - protein_coding:five_prime_utr,three_prime_utr,exon,CDS |
b |
diff -r 6010786c9960 -r 86bc5c328db2 ALFA/test-data/alfa_toy.unstranded.index --- a/ALFA/test-data/alfa_toy.unstranded.index Tue Oct 11 06:52:56 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,6 +0,0 @@ -#Chr1 1250 -Chr1 249 374 . protein_coding:five_prime_utr,gene,transcript -Chr1 374 375 . protein_coding:five_prime_utr,three_prime_utr,exon,CDS -Chr1 375 999 . protein_coding:exon,CDS -Chr1 999 1000 . protein_coding:three_prime_utr,exon,CDS -Chr1 1000 1250 . protein_coding:five_prime_utr,exon,CDS,three_prime_utr,gene,transcript |
b |
diff -r 6010786c9960 -r 86bc5c328db2 ALFA/tool-data/alfa_genomes_indexes.loc.sample --- a/ALFA/tool-data/alfa_genomes_indexes.loc.sample Tue Oct 11 06:52:56 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,5 +0,0 @@ -#<species> <version> <release> <value> <dbkey> <name> <prefix> -Arabidopsis_thaliana TAIR10 30 Arabidopsis_t_TAIR10_30 Arabidopsis_t_TAIR10_30 Arabidopsis thaliana: TAIR10 /export/home1/users/biocomp/chbernar/data/alfa_indexes/Arabidopsis_thaliana.TAIR10.30 -Drosophila_melanogaster dm6 30 Drosophila_m_dm6_30 Drosophila_m_dm6_30 Drosophila melanogaster: dm6 /export/home1/users/biocomp/chbernar/data/alfa_indexes/Drosophila_melanogaster.BDGP6.30 -Homo_sapiens v38 82 Homo_s_v38_82 Homo_s_v38_82 Homo sapiens: v38 /export/home1/users/biocomp/chbernar/data/alfa_indexes/Homo_sapiens.GRCh38.82 -Mus_musculus v38 83 Mus_m_v38_83 Mus_m_v38_83 Mus musculus: v38 /export/home1/users/biocomp/chbernar/data/alfa_indexes/Mus_musculus.GRCm38.83.chr \ No newline at end of file |
b |
diff -r 6010786c9960 -r 86bc5c328db2 ALFA/tool_data_table_conf.xml.sample --- a/ALFA/tool_data_table_conf.xml.sample Tue Oct 11 06:52:56 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,7 +0,0 @@ -<tables> - <!-- Locations of all alfa indexes --> - <table name="alfa_indexes" comment_char="#" allow_duplicate_entries="False"> - <columns>species, version, release, value, dbkey, name, prefix</columns> - <file path="tool-data/alfa_genomes_indexes.loc" /> - </table> -</tables> \ No newline at end of file |
b |
diff -r 6010786c9960 -r 86bc5c328db2 ALFA/tool_dependencies.xml --- a/ALFA/tool_dependencies.xml Tue Oct 11 06:52:56 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,6 +0,0 @@ -<tool_dependency> - <package name="bedtools" version="2.22" /> - <package name="samtools" version="1.2" /> - <package name="matplotlib" version="1.5.3" /> -</tool_dependency> - |
b |
diff -r 6010786c9960 -r 86bc5c328db2 ALFA/tools/alfa/ALFA.py --- a/ALFA/tools/alfa/ALFA.py Tue Oct 11 06:52:56 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
[ |
b'@@ -1,1160 +0,0 @@\n-#!/usr/bin/python\n-#-*- coding: utf-8 -*-\n-\n-__author__ = \'noel & bahin\'\n-\'\'\' <decription> \'\'\'\n-\n-import argparse\n-import os\n-import numpy\n-import sys\n-import subprocess\n-import matplotlib.pyplot as plt\n-import matplotlib.cm as cmx\n-import matplotlib.colors as colors\n-import matplotlib.patheffects as PathEffects\n-import re\n-from matplotlib.backends.backend_pdf import PdfPages\n-# To correctly embbed the texts when saving plots in svg format\n-import matplotlib\n-matplotlib.rcParams[\'svg.fonttype\'] = \'none\'\n-\n-##########################################################################\n-# FUNCTIONS #\n-##########################################################################\n-\n-def init_dict(d, key, init):\n-\tif key not in d:\n-\t\td[key] = init\n-\n-def get_chromosome_lengths(args):\n-\t"""\n-\tParse the file containing the chromosomes lengths.\n-\tIf no length file is provided, browse the annotation file (GTF) to estimate the chromosome sizes (\n-\t"""\n-\tlengths={}\n-\tgtf_chrom_names=set()\n-\tforce_get_lengths = False\n-\t# If the user provided the chromosome length file\n-\tif args.chr_len:\n-\t\twith open(args.chr_len, \'r\') as chr_len_file:\n-\t\t\tfor line in chr_len_file:\n-\t\t\t\tlengths[line.split(\'\\t\')[0]] = int(line.rstrip().split(\'\\t\')[1])\n-\t\twith open(args.annotation,\'r\') as gtf_file:\n-\t\t\tfor line in gtf_file:\n-\t\t\t\tif not line.startswith(\'#\'):\n-\t\t\t\t\tchrom = line.split(\'\\t\')[0]\n-\t\t\t\t\tif chrom not in gtf_chrom_names:\n-\t\t\t\t\t\tgtf_chrom_names.add(chrom)\n-\t\tfor chrom in lengths.keys():\n-\t\t\tif chrom not in gtf_chrom_names:\n-\t\t\t\tprint "Warning: at least one chromosome name (\'"+chrom+"\') of the file \'"+args.chr_len+"\'does not match any chromosome name if GTF and was ignored."\n-\t\t\t\t#del lengths[chrom]\n-\t\t\t\tbreak\n-\t\tfor chrom in gtf_chrom_names:\n-\t\t\tif force_get_lengths: break\n-\t\t\tif chrom not in lengths.keys():\n-\t\t\t\tprint "WARNING: chromosome name \'"+chrom+"\' was found in gtf and does not match any chromosome name provided in",args.chr_len+". "\n-\t\t\t\tprint "\\t=> The chromosome lenghts will be approximated using annotations in the GTF file."\n-\t\t\t\tcontinue_value =""\n-\t\t\t\twhile continue_value not in {"yes","y","no","n"}:\n-\t\t\t\t\tcontinue_value = raw_input("\\tDo you want to continue (\'yes\' or \'y\')?\\n\\tElse write \'no\' or \'n\' to exit the script and check your file of lengths.\\n")\n-\t\t\t\t\tif continue_value == "no" or continue_value == "n":\n-\t\t\t\t\t\tsys.exit("Exiting")\n-\t\t\t\t\telif continue_value == "yes" or continue_value == "y":\n-\t\t\t\t\t\tforce_get_lengths = True\n-\t\t\t\t\t\tbreak\n-\t\t\t\t\tprint "Error: use \'yes/y/no/n\' only"\n-\t\tif not force_get_lengths:\n-\t\t\treturn lengths\n-\t# Otherwise, (or if at least one chromosome was missing in chromosome lengths file) we consider the end of the last annotation of the chromosome in the GTF file as the chromosome length\n-\twith open(args.annotation, \'r\') as gtf_file:\n-\t\tfor line in gtf_file:\n-\t\t\tif not line.startswith(\'#\'):\n-\t\t\t\tchrom = line.split(\'\\t\')[0]\n-\t\t\t\tend = int(line.split(\'\\t\')[4])\n-\t\t\t\tinit_dict(lengths, chrom, 0)\n-\t\t\t\tlengths[chrom] = max(lengths[chrom], end)\n-\t\tif force_get_lengths:\n-\t\t\tprint "The chromosome lenghts have been approximated using the last annotations in the GTF file."\n-\t\treturn lengths\n-\n-def write_feature_on_index(feat,chrom, start, stop, sign, stranded_genome_index, unstranded_genome_index=None):\n-\tgrouped_by_biotype_features = []\n-\tfor biotype,categs in feat.iteritems():\n-\t\tcateg_list=[]\n-\t\tfor cat in set(categs):\n-\t\t\tcateg_list.append(cat)\n-\t\tgrouped_by_biotype_features.append(":".join((str(biotype),",".join(categ_list))))\n-\tstranded_genome_index.write(\'\\t\'.join((chrom, start, stop, sign,\'\'))+\'\\t\'.join(grouped_by_biotype_features)+\'\\n\')\n-\tif unstranded_genome_index :\n-\t\tunstranded_genome_index.write(\'\\t\'.join((chrom, start, stop, \'.\',\'\'))+\'\\t\'.join(grouped_by_biotype_features)+\'\\n\')\n-\n-\n-def add_info(cpt, feat_values, start, stop, chrom=None, unstranded_genome_index=None, stranded_genome_index = None , biotype_prios=None, coverage=1, cate'..b'mples_files,samples_names,prios,genome_index, options.strandness[0], biotype_prios = None)\n-\n-\t#### Write the counts on disk\n-\twrite_counts_in_files(cpt,cpt_genome)\n-\n-if not (intersect_reads or process_counts) or (options.quiet and options.pdf == False):\n-\tquit("\\n### End of program")\n-print "\\n### Generating plots"\n-# Updating the biotypes lists (biotypes and \'biotype_group1\'): adding the \'unknow biotypes\' found in gtf/index\n-if unknown_feature == []: # \'unknown_feature\' is define only during the index generation\n-\t# Browse the feature to determine whether some biotypes are \'unknown\'\n-\tfor sample,counts in cpt.items():\n-\t\tfor (cat,biot) in counts:\n-\t\t\tif biot not in biotypes and cat not in unknown_feature:\n-\t\t\t\tunknown_feature.append(biot)\n-for new_biot in unknown_feature:\n-\tbiotypes.add(new_biot)\n-\tbiotypes_group1["others"].append(new_biot)\n-biotypes = sorted(biotypes)\n-# move antisense categ to the end of the list\n-biotypes.remove(\'antisense\')\n-biotypes.append(\'antisense\')\n-biotypes_group1 = sorted(biotypes_group1)\n-\n-\n-#print \'\\nCounts for every category/biotype pair: \',cpt\n-\n-# Generating plots\n-if options.pdf != False:\n-\tif options.pdf == None:\n-\t\toptions.pdf = "categories_plots.pdf"\n-\tpdf = PdfPages(options.pdf)\n-else:\n-\tpdf = False\n-\n-selected_biotype = None\n-if options.biotype_filter:\n-\toptions.biotype_filter = options.biotype_filter[0]\n-\tfor sample in cpt:\n-\t\tfor feature in cpt[sample]:\n-\t\t\tbiotype = feature[1]\n-\t\t\tif options.biotype_filter.lower() == biotype.lower():\n-\t\t\t\tselected_biotype=biotype\n-\t\t\t\tbreak\n-\tif selected_biotype == None :\n-\t\tprint "\\nError: biotype \'"+options.biotype_filter+"\' not found. Please check the biotype name and that this biotype exists in your sample(s)."\n-\t\tsys.exit()\n-\n-#Print a warning message if the UTRs are not specified as 5\' or 3\' (they will be ploted as 5\'UTR)\n-if \'UTR\' in [categ[0] for counts in cpt.values() for categ in counts.keys()]:\n-\tprint \'\'\'\\nWARNING: (some) 5\'UTR/3\'UTR are not precisely defined. Consequently, positions annotated as "UTR" will be counted as "5\'UTR"\\n\'\'\'\n-\n-#### Make the plot by categories\n-\t#### Recategorizing with the final categories\n-final_cats=categs_groups[options.categories_depth-1]\n-final_cat_cpt,final_genome_cpt, filtered_cat_cpt = group_counts_by_categ(cpt,cpt_genome,final_cats,selected_biotype)\n-\t#### Display the distribution of specified categories (or biotypes) in samples on a barplot\n-# Remove the \'antisense\' category if the library type is \'unstranded\'\n-for dic in cpt.values():\n-\tif (\'antisense\',\'antisense\') in dic.keys(): break\n-else:\n-\tcat_list.remove(\'antisense\')\n-make_plot(cat_list,samples_names,final_cat_cpt,final_genome_cpt,pdf, "categories",options.threshold, svg = options.svg, png = options.png)\n-if selected_biotype :\n-\tmake_plot(cat_list,samples_names,filtered_cat_cpt,final_genome_cpt,pdf, "categories",options.threshold,title="Categories distribution for \'"+selected_biotype+"\' biotype", svg = options.svg, png = options.png)\n-\n-#### Make the plot by biotypes\n-\t#### Recategorizing with the final categories\n-final_cat_cpt,final_genome_cpt = group_counts_by_biotype(cpt,cpt_genome,biotypes)\n-\t#### Display the distribution of specified categories (or biotypes) in samples on a barplot\n-make_plot(biotypes,samples_names,final_cat_cpt,final_genome_cpt,pdf, "biotypes",options.threshold, svg = options.svg, png = options.png)\n-\n-\n-\n-\t##### Recategorizing with the final categories\n-#final_cat_cpt,final_genome_cpt = group_counts_by_biotype(cpt,cpt_genome,biotypes_group1)\n-\t##### Display the distribution of specified categories (or biotypes) in samples on a barplot\n-#make_plot(biotypes_group1,samples_names,final_cat_cpt,final_genome_cpt,pdf,"Biotype groups", options.threshold, title="Biotypes distribution in mapped reads \\n(biotypes are grouped by \'family\')", svg = options.svg, png = options.png)\n-\n-\n-if options.pdf:\n-\tpdf.close()\n-\tprint "\\n### Plots saved in pdf file: %s" %options.pdf\n-\t\n-print "\\n### End of program"\n\\ No newline at end of file\n' |
b |
diff -r 6010786c9960 -r 86bc5c328db2 ALFA/tools/alfa/alfa_wrapper.sh --- a/ALFA/tools/alfa/alfa_wrapper.sh Tue Oct 11 06:52:56 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
[ |
b'@@ -1,233 +0,0 @@\n-#!usr/bin/bash \n-\n-#########################################################################################################\n-# ARGUMENTS FROM alfa_wrapper.xml #\n-#########################################################################################################\n-configFile=$1;\n-logReport=$2;\n-sed -i -e \'/^$/d; s/\\t//g;\' $configFile;\n-printf "__________________________________________________________________\\n\\n" > $logReport\n-printf " ALFA CONFIG \\n" >> $logReport\n-printf "__________________________________________________________________\\n" >> $logReport\n-cat $configFile >> $logReport\n-\n-#########################################################################################################\n-# INITIALIZATION OF THE VARIABLES from $configFile #\n-#########################################################################################################\n-#_INPUT1\n-annotationSource=`grep -P \'^annotationSource ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-if [ "$annotationSource" == "personal_gtf" ]; then\n-\tannotationFile=`grep -P \'^annotationFile ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-elif [ "$annotationSource" == "built_in_index" ]; then\n-\tbuilt_in_index_prefix=`grep -P \'^built_in_index_prefix ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-else\n-\tstrandedIndex=`grep -P \'^strandedIndex ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\tunstrandedIndex=`grep -P \'^unstrandedIndex ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-fi\n-\n-#_INPUT2\n-readsType=`grep -P \'^readsType ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-readsFileList=`grep -P \'^readsFile\\[[0-9]+\\] ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-readsLabelList=`grep -P \'^readsLabel\\[[0-9]+\\] ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\n-#_OUTPUT CHOICES\n-plotChoice=`grep -P \'^plotChoice ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-countFileChoice=`grep -P \'^countFileChoice ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-indexChoice=`grep -P \'^indexChoice ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\n-#_OUTPUT OPTIONS\n-strandness=`grep -P \'^strandness ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-categoriesDepth=`grep -P \'^categoriesDepth ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-plotFormat=`grep -P \'^plotFormat ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-plotThresholdChoice=`grep -P \'^plotThresholdChoice ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-if [ "$plotThresholdChoice" == "True" ]; then\n-\tyMin=`grep -P \'^yMin ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n- \tyMax=`grep -P \'^yMax ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-fi\n-\n-#_OUTPUT FILES\n-if [ "$plotChoice" == "True" ]; then \n-\tif [ "$plotFormat" == "pdf" ]; then\n-\t\toutputPdf=`grep -P \'^outputPdf ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\telif [ "$plotFormat" == "svg" ]; then\n-\t\toutputCategoriesSvg=`grep -P \'^outputCategoriesSvg ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\t\toutputBiotypesSvg=`grep -P \'^outputBiotypesSvg ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\telse\n-\t\toutputCategoriesPng=`grep -P \'^outputCategoriesPng ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\t\toutputBiotypesPng=`grep -P \'^outputBiotypesPng ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\tfi\n-fi\n-if [ "$countFileChoice" == "True" ]; then \n-\toutputCountFile=`grep -P \'^outputCountFile ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-fi\n-if [ "$indexChoice" == "True" ]; then \n-\toutputStrandedIndex=`grep -P \'^outputStrandedIndex ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\toutputUnstrandedIndex=`grep -P \'^outputUnstrandedIndex ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-fi\n-\n-####################################################'..b'&& [ "$countFileChoice" == "False" ] && [ "$indexChoice" == "False" ]; then\n-cat <<error 1>&2\n-\n-No output to return. \n-Process Aborted\n-error\n-exit 0\n-fi\n-\n-printf "Command:\\n" >> $logReport\n-echo "python ""$scriptPath"ALFA.py $scriptInput $scriptStrandness $scriptCategoriesDepth $scriptPlotOutput >> $logReport;\n-printf "\\n******************************************************************\\n" >> $logReport\n-printf "Temporary Output Directory:\\n" >> $logReport\n-echo $outputDirectory >> $logReport\n-printf "\\n******************************************************************\\n" >> $logReport\n-printf "ALFA prompt:\\n" >> $logReport\n-python "$scriptPath"ALFA.py $scriptInput $scriptStrandness $scriptCategoriesDepth $scriptPlotOutput >> $logReport 2>errorFile;\n-printf "\\n******************************************************************\\n" >> $logReport\n-\n-#########################################################################################################\n-# REDIRECTION OF ERRORS - TMP SOURCE ALFA.PY MUST BE CORRECTED SOON #\n-#########################################################################################################\n-if [[ -s errorFile ]]; then\n-\t#When the option --n is enabled, alfa prints \'### End of the program\' in stderr even if the process worked-\n-\t#The following lines to avoid the tool from crashing in this case\n-\tendProgram=`grep -c \'### End of program\' errorFile`\n-\tif [ "$endProgram" == "0" ]; then\n-\t\t#When alfa prints \'### End of program\' in stdout, all the messages in stderr are considered\n-\t\t#as warnings and not as errors. True errors make the script exits with code "2"\n-\t\tendProgram=`grep -c \'### End of program\' $logReport`\n-\t\tif [ "$endProgram" == "0" ]; then\n- \t\t\t>&2 printf "The script ALFA.py encountered the following error:\\n\\n"\n-\t\t\t>&2 cat errorFile\n-\t\t\tprintf "ALFA error:\\n" >> $logReport\n-\t\t\tcat errorFile >> $logReport\n-\t\t\tprintf "\\n******************************************************************\\n" >> $logReport\n- \t\t\texit 2\n- \t\telse\n- \t\t\t>&2 printf "The script ALFA.py encountered the following warning:\\n\\n"\n- \t\t\t>&2 cat errorFile \n- \t\t\tprintf "ALFA warning:\\n" >> $logReport\n- \t\t\tcat errorFile >> $logReport\n-\t\t\tprintf "\\n******************************************************************\\n" >> $logReport\n- \t\tfi\n- \tfi\n-fi\n-\n-#########################################################################################################\n-# OUTPUT REDIRECTIONS #\n-#########################################################################################################\n-if [ "$plotChoice" == "True" ]; then\n-\tif [ "$plotFormat" == "pdf" ]; then\n-\t\tmv "plotFile.pdf" $outputPdf;\n-\telif [ "$plotFormat" == "png" ]; then\n-\t\tmv "plotFile.categories.png" $outputCategoriesPng;\n-\t\tmv "plotFile.biotypes.png" $outputBiotypesPng;\n-\telse \n-\t\tmv "plotFile.categories.svg" $outputCategoriesSvg;\n-\t\tmv "plotFile.biotypes.svg" $outputBiotypesSvg;\n-\tfi\n-fi\n-if [ "$countFileChoice" == "True" ]; then\n-\t> countFile;\n-\tfor (( i = 1; i <= readsListLen; i++ )) do\n-\t\tprintf "##LABEL: "${readsLabel[$i]}"\\n\\n" >> countFile;\n-\t\tcat ${readsLabel[$i]}".categories_counts" >> countFile;\n-\t\tprintf "__________________________________________________________________\\n" >> countFile;\n-\tdone\n-\tmv countFile $outputCountFile;\n-fi\n-if [ "$indexChoice" == "True" ]; then\n-\tif [ "$annotationSource" == "index" ]; then\n-\t\tmv $strandedIndex $outputStrandedIndex\n-\t\tmv $unstrandedIndex $outputUnstrandedIndex\n-\telif [ "$annotationSource" == "built_in_index" ]; then\n-\t\tcp $built_in_index_prefix".stranded.index" $outputStrandedIndex\n-\t\tcp $built_in_index_prefix".unstranded.index" $outputUnstrandedIndex\n-\telse\n-\t\tannotationFileName=`grep -P -o \'[^/]*\\.dat$\' <<< $annotationFile`\n-\t\tmv $annotationFileName".stranded.index" $outputStrandedIndex\n-\t\tmv $annotationFileName".unstranded.index" $outputUnstrandedIndex\n-\tfi\n-fi\n\\ No newline at end of file\n' |
b |
diff -r 6010786c9960 -r 86bc5c328db2 ALFA/tools/alfa/alfa_wrapper.xml --- a/ALFA/tools/alfa/alfa_wrapper.xml Tue Oct 11 06:52:56 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
b'@@ -1,322 +0,0 @@\n-<tool id="alfa" name="ALFA" version="0.1.0">\n-\t<description>- Compute and display distribution of reads by genomic categories</description>\n-\n-\t<!-- ALFA requires bedtools suite v2.20.0 and above -->\n-\t<requirements>\n- \t<requirement type="package">bedtools</requirement>\n- \t<requirement type="package">samtools</requirement>\n- \t<requirement type="package" version="1.5.3">matplotlib</requirement>\n- \t</requirements>\n-\n- \t<command interpreter="bash">\n- \t\talfa_wrapper.sh ${ALFA_config} $logReport\n- \t</command>\t\n-\t\n-\t<inputs>\n-\t\t<param name="projectName" value="ALFA" type="text" size="20" label="Project Name">\n-\t\t\t<validator type="empty_field" message="Please, specify a name for your project."/>\n-\t\t</param>\n-\n-\t\t<section name="annotation" title="INPUT 1: Annotation File (GTF format)" expanded="True">\n-\t\t\t<conditional name="annotationSource">\n-\t\t\t\t<param name="annotationSourceSelection" type="select" label="Select the source of your annotated sequence/genome">\n-\t\t\t\t\t<option value="personal_gtf" selected="true">Personal annotation file (GTF format)</option>\n-\t\t\t\t\t<option value="index">Stranded and Unstranded Indexes previously generated by ALFA (Index format)</option>\n-\t\t\t\t\t<option value="built_in_index">Built-in indexes among a list of referenced genome (Index format)</option>\n-\t\t\t\t</param>\n-\t\t\t\t<when value="personal_gtf">\n-\t\t\t\t\t<param name="annotationFile" type="data" format="Gff, Gtf" label="Select your personal annotation file (GTF format)">\n-\t\t\t\t\t</param>\n-\t\t\t\t</when>\n-\t\t\t\t<when value="index">\n-\t\t\t\t\t<param name="strandedIndex" type="data" format="index" label="Select your ALFA stranded index file (index format)"/>\n-\t\t\t\t\t<param name="unstrandedIndex" type="data" format="index" label="Select your ALFA Unstranded index file (index format)"/>\n-\t\t\t\t</when>\n-\t\t\t\t<when value="built_in_index">\n-\t\t\t\t\t<param name="built_in_index_prefix" type="select" label="Select Genome">\n-\t\t\t\t\t\t<options from_data_table="alfa_indexes">\n-\t\t\t\t\t\t\t<validator type="no_options" message="No indexes are available for the selected input dataset" />\n-\t\t\t\t\t\t</options>\n-\t\t\t\t\t</param>\n-\t\t\t\t</when>\n-\t\t\t</conditional>\n-\t\t</section>\n-\n-\t\t<section name="reads" title="INPUT 2: Aligned Reads File(s) of the annotated sequence (BAM or BEDGRAPH format)" expanded="True">\n-\t\t\t<conditional name="readsType">\n-\t\t\t\t<param name="readsTypeSelection" type="select" label="Select the format of the reads file(s)">\n-\t\t\t\t\t<option value="bam" selected="true">BAM</option>\n-\t\t\t\t\t<option value="bedgraph">BEDGRAPH</option>\n-\t\t\t\t</param>\n-\t\t\t\t<when value="bam">\n-\t\t\t\t\t<repeat name="readsList" title="Reads File" min="1" >\n-\t\t\t\t\t\t<param name="readsFile" type="data" format="Bam" label="Select the reads file of your annotated sequence (BAM format)"/>\n-\t\t\t\t\t\t<param name="readsLabel" type="text" size="20" value="" label="Label of the reads" optional="True"/>\n-\t\t\t\t\t</repeat>\n-\t\t\t\t</when>\n-\t\t\t\t<when value="bedgraph">\n-\t\t\t\t\t<repeat name="readsList" title="Reads File" min="1">\n-\t\t\t\t\t\t<param name="readsFile" type="data" format="Bed" label="Select the reads file of your annotated sequence (BEDGRAPH format)"/>\n-\t\t\t\t\t\t<param name="readsLabel" type="text" size="20" value="" label="Label of the reads" optional="True"/>\n-\t\t\t\t\t</repeat>\n-\t\t\t\t</when>\n-\t\t\t</conditional>\n-\t\t\t<param name="strandness" type="select" label="Select the strandness of your mapped reads dataset">\n-\t\t\t\t<option value="unstranded" selected="true">Unstranded (reads will match genomic features on both forward and reverse strands of the annotated sequence)</option>\n-\t\t\t\t<option value="forward">Forward (reads will match only genomic features on the forward strand of the annotated sequence)</option>\n-\t\t\t\t<option value="reverse">Reverse (reads will match only genomic features on the reverse strand of the annotated sequence)</option>\n-\t\t\t</param>\n-\t\t</section>\n-\n-\t\t<section name="outputFiles" title="OUTPUT FILES: Choose the output files" expanded="False">\n-\t\t\t<param name="plot" type="boolean" truevalue="True" falsevalue='..b'oy.categories_count" ftype="txt" />\n-\t\t\t<output name="outputStrandedIndex" file="alfa_toy.stranded.index" ftype="txt" />\n-\t\t\t<output name="outputUnstrandedIndex" file="alfa_toy.unstranded.index" ftype="txt" />\n-\t\t\t<assert_stdout>\n-\t\t\t\t<has_text text="### End of the program" />\n-\t\t\t</assert_stdout>\n-\t\t</test>\n-\t</tests>\n-\n-\t<help>\n-**ALFA acronym**\n-\n-- Annotation.Landscape.For.Aligned reads\n-\n-----\n-\n-**What it does**\n-\n-\t| ALFA provides a global overview of features distribution composing New Generation Sequencing dataset(s). \n-\t|\n- \t| Given a set of aligned reads (BAM files) and an annotation file (GTF format), the tool produces plots of the raw and normalized distributions of those reads among genomic categories (stop codon, 5\'-UTR, CDS, intergenic, etc.) and biotypes (protein coding genes, miRNA, tRNA, etc.). Whatever the sequencing technique, whatever the organism.\n-\n-----\n-\n-**Official documentation of the tool**\n-\n-\n-- https://github.com/biocompibens/ALFA\n-\n-----\n-\n-**Detailed example**\n-\n-- https://github.com/biocompibens/ALFA#detailed-example\n-\n-----\n-\n-**Nota Bene**\n-\n-1. **Input 1: Annotation File**\n-\n-\n-\t| ALFA requires as first input an annotation file (sequence, genome...) in gtf format in order to generate indexes that will be used in a 2nd step of the program.\n-\t| Indexes are files which list all the coordinates of all categories (stop codon, 5\'-UTR, CDS, intergenic...) and biotypes (protein coding genes, miRNA, tRNA, ...) encountered in the annotated sequence.\n-\t\n-.. class:: warningmark\n-\n-Gtf File must be sorted.\n-\n-.. class:: infomark\n-\n-Generation of indexes from an annotation file may be time consuming (i.e ~10min for the human genome). Thus, ALFA allows the user to submit directly indexes generated in previous runs.\n-\n-2. **Input 2: Reads**\n-\n-\t| ALFA requires as second input a single or a set of mapped reads file(s) in either bam or bedgraph format. These files are required to intersect the coordinates of the mapped reads with the associated categories and biotypes on the annotated sequence.\n-\t| The strandness option determines which strand of the annotated sequence will be taken into account during this intersection.\n-\n-.. class:: warningmark\n-\n-Bam or Bedgraph file(s) must be sorted.\n-\n-<!--\n-.. class:: warningmark\n-\n-For oriented reads (either matching the forward strand or the reverse strand), \'forward\' or \'reverse\' strandness must be selected.\n-\n-.. class:: warningmark\n-\n-For paired-end or non-oriented reads, \'unstranded\' strandness must be selected.\n--->\n-\n-3. **Output files**\n-\n-\t| The result of the intersection is a count file displaying the count of nucleotides in the reads for each genomic categories and biotypes. From this count file, plots of the raw and normalized distributions of the reads among these categories are generated.\n-\t| In the output files section, the user can choose what kind of files he desires as ALFA output. Categories Count File and Plots are proposed by default. \n-\n-.. class:: infomark\n-\n-The user can also select the \'indexes\' option as output. This option is interesting if you plan to run ALFA again with the same submitted annotation file. *See Nota Bene/Input 1: Annotation File for more information.*\n-\n-\n-- `How the plots look like`_\n-\n-.. _How the plots look like: https://github.com/biocompibens/ALFA#plots\n-\n-- `How they are generated`_ \n-\n-.. _How they are generated: https://github.com/biocompibens/ALFA#detailed-example\n-\n-----\n-\n-**ALFA Developpers**\n-\n-\t| Beno\xc3\xaet No\xc3\xabl and Mathieu Bahin: *compbio team, Institut de Biologie de l\'Ecole Normale Sup\xc3\xa9rieure de Paris*\n-\n-\n- </help>\n-\n- <citations>\n- \t<citation type="bibtex">@MISC{\n- \t\tauthor="Beno\xc3\xaet No\xc3\xabl and Mathieu Bahin"\n- \t\ttitle="ALFA: Annotation Landscape For Aligned reads"\n- \t\tcrossref="https://github.com/biocompibens/ALFA"\n- \t\tinstitution="Institut de Biologie de l\'Ecole Normale Sup\xc3\xa9rieure de Paris"\n- \t\t}\n- \t</citation>\n- </citations>\n-</tool>\n\\ No newline at end of file\n' |
b |
diff -r 6010786c9960 -r 86bc5c328db2 alfa/ALFA/test-data/alfa_toy-Biofeatures Distribution.pdf |
b |
Binary file alfa/ALFA/test-data/alfa_toy-Biofeatures Distribution.pdf has changed |
b |
diff -r 6010786c9960 -r 86bc5c328db2 alfa/ALFA/test-data/alfa_toy.bam |
b |
Binary file alfa/ALFA/test-data/alfa_toy.bam has changed |
b |
diff -r 6010786c9960 -r 86bc5c328db2 alfa/ALFA/test-data/alfa_toy.bedgraph --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/alfa/ALFA/test-data/alfa_toy.bedgraph Tue Oct 11 06:54:24 2016 -0400 |
b |
@@ -0,0 +1,4 @@ +Chr1 149 199 2 +Chr1 299 349 1 +Chr1 499 549 6 +Chr1 1099 1149 1 |
b |
diff -r 6010786c9960 -r 86bc5c328db2 alfa/ALFA/test-data/alfa_toy.categories_counts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/alfa/ALFA/test-data/alfa_toy.categories_counts Tue Oct 11 06:54:24 2016 -0400 |
b |
@@ -0,0 +1,5 @@ +#Category,biotype Counts_in_bam Size_in_genome +CDS,protein_coding 300.0 624.0 +five_prime_utr,protein_coding 75.0 250.5 +three_prime_utr,protein_coding 25.0 126.5 +intergenic,intergenic 100.0 249.0 |
b |
diff -r 6010786c9960 -r 86bc5c328db2 alfa/ALFA/test-data/alfa_toy.gtf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/alfa/ALFA/test-data/alfa_toy.gtf Tue Oct 11 06:54:24 2016 -0400 |
b |
@@ -0,0 +1,6 @@ +Chr1 ensembl_havana gene 250 1250 . + . gene_id "ENSMUSG00000051951"; gene_biotype "protein_coding"; +Chr1 ensembl_havana transcript 250 1250 . + . gene_id "ENSMUSG00000051951"; gene_biotype "protein_coding"; +Chr1 ensembl_havana exon 375 1000 . + . gene_id "ENSMUSG00000051951"; gene_biotype "protein_coding"; +Chr1 ensembl_havana CDS 375 1000 . + 0 gene_id "ENSMUSG00000051951"; gene_biotype "protein_coding"; +Chr1 ensembl_havana five_prime_utr 250 375 . - . gene_id "ENSMUSG00000051951"; gene_biotype "protein_coding"; +Chr1 ensembl_havana three_prime_utr 1000 1250 . - . gene_id "ENSMUSG00000051951"; gene_biotype "protein_coding"; |
b |
diff -r 6010786c9960 -r 86bc5c328db2 alfa/ALFA/test-data/alfa_toy.stranded.index --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/alfa/ALFA/test-data/alfa_toy.stranded.index Tue Oct 11 06:54:24 2016 -0400 |
b |
@@ -0,0 +1,11 @@ +#Chr1 1250 +Chr1 249 374 + protein_coding:gene,transcript +Chr1 249 374 - protein_coding:five_prime_utr +Chr1 374 375 + protein_coding:exon,CDS +Chr1 374 375 - protein_coding:five_prime_utr,three_prime_utr +Chr1 375 999 + protein_coding:exon,CDS +Chr1 375 999 - antisense +Chr1 999 1000 + protein_coding:exon,CDS +Chr1 999 1000 - protein_coding:three_prime_utr +Chr1 1000 1250 + protein_coding:gene,transcript +Chr1 1000 1250 - protein_coding:five_prime_utr,three_prime_utr,exon,CDS |
b |
diff -r 6010786c9960 -r 86bc5c328db2 alfa/ALFA/test-data/alfa_toy.unstranded.index --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/alfa/ALFA/test-data/alfa_toy.unstranded.index Tue Oct 11 06:54:24 2016 -0400 |
b |
@@ -0,0 +1,6 @@ +#Chr1 1250 +Chr1 249 374 . protein_coding:five_prime_utr,gene,transcript +Chr1 374 375 . protein_coding:five_prime_utr,three_prime_utr,exon,CDS +Chr1 375 999 . protein_coding:exon,CDS +Chr1 999 1000 . protein_coding:three_prime_utr,exon,CDS +Chr1 1000 1250 . protein_coding:five_prime_utr,exon,CDS,three_prime_utr,gene,transcript |
b |
diff -r 6010786c9960 -r 86bc5c328db2 alfa/ALFA/tool-data/alfa_genomes_indexes.loc.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/alfa/ALFA/tool-data/alfa_genomes_indexes.loc.sample Tue Oct 11 06:54:24 2016 -0400 |
b |
@@ -0,0 +1,5 @@ +#<species> <version> <release> <value> <dbkey> <name> <prefix> +Arabidopsis_thaliana TAIR10 30 Arabidopsis_t_TAIR10_30 Arabidopsis_t_TAIR10_30 Arabidopsis thaliana: TAIR10 /export/home1/users/biocomp/chbernar/data/alfa_indexes/Arabidopsis_thaliana.TAIR10.30 +Drosophila_melanogaster dm6 30 Drosophila_m_dm6_30 Drosophila_m_dm6_30 Drosophila melanogaster: dm6 /export/home1/users/biocomp/chbernar/data/alfa_indexes/Drosophila_melanogaster.BDGP6.30 +Homo_sapiens v38 82 Homo_s_v38_82 Homo_s_v38_82 Homo sapiens: v38 /export/home1/users/biocomp/chbernar/data/alfa_indexes/Homo_sapiens.GRCh38.82 +Mus_musculus v38 83 Mus_m_v38_83 Mus_m_v38_83 Mus musculus: v38 /export/home1/users/biocomp/chbernar/data/alfa_indexes/Mus_musculus.GRCm38.83.chr \ No newline at end of file |
b |
diff -r 6010786c9960 -r 86bc5c328db2 alfa/ALFA/tool_data_table_conf.xml.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/alfa/ALFA/tool_data_table_conf.xml.sample Tue Oct 11 06:54:24 2016 -0400 |
b |
@@ -0,0 +1,7 @@ +<tables> + <!-- Locations of all alfa indexes --> + <table name="alfa_indexes" comment_char="#" allow_duplicate_entries="False"> + <columns>species, version, release, value, dbkey, name, prefix</columns> + <file path="tool-data/alfa_genomes_indexes.loc" /> + </table> +</tables> \ No newline at end of file |
b |
diff -r 6010786c9960 -r 86bc5c328db2 alfa/ALFA/tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/alfa/ALFA/tool_dependencies.xml Tue Oct 11 06:54:24 2016 -0400 |
b |
@@ -0,0 +1,6 @@ +<tool_dependency> + <package name="bedtools" /> + <package name="samtools" /> + <package name="matplotlib" version="1.5.3" /> +</tool_dependency> + |
b |
diff -r 6010786c9960 -r 86bc5c328db2 alfa/ALFA/tools/alfa/ALFA.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/alfa/ALFA/tools/alfa/ALFA.py Tue Oct 11 06:54:24 2016 -0400 |
[ |
b'@@ -0,0 +1,1160 @@\n+#!/usr/bin/python\n+#-*- coding: utf-8 -*-\n+\n+__author__ = \'noel & bahin\'\n+\'\'\' <decription> \'\'\'\n+\n+import argparse\n+import os\n+import numpy\n+import sys\n+import subprocess\n+import matplotlib.pyplot as plt\n+import matplotlib.cm as cmx\n+import matplotlib.colors as colors\n+import matplotlib.patheffects as PathEffects\n+import re\n+from matplotlib.backends.backend_pdf import PdfPages\n+# To correctly embbed the texts when saving plots in svg format\n+import matplotlib\n+matplotlib.rcParams[\'svg.fonttype\'] = \'none\'\n+\n+##########################################################################\n+# FUNCTIONS #\n+##########################################################################\n+\n+def init_dict(d, key, init):\n+\tif key not in d:\n+\t\td[key] = init\n+\n+def get_chromosome_lengths(args):\n+\t"""\n+\tParse the file containing the chromosomes lengths.\n+\tIf no length file is provided, browse the annotation file (GTF) to estimate the chromosome sizes (\n+\t"""\n+\tlengths={}\n+\tgtf_chrom_names=set()\n+\tforce_get_lengths = False\n+\t# If the user provided the chromosome length file\n+\tif args.chr_len:\n+\t\twith open(args.chr_len, \'r\') as chr_len_file:\n+\t\t\tfor line in chr_len_file:\n+\t\t\t\tlengths[line.split(\'\\t\')[0]] = int(line.rstrip().split(\'\\t\')[1])\n+\t\twith open(args.annotation,\'r\') as gtf_file:\n+\t\t\tfor line in gtf_file:\n+\t\t\t\tif not line.startswith(\'#\'):\n+\t\t\t\t\tchrom = line.split(\'\\t\')[0]\n+\t\t\t\t\tif chrom not in gtf_chrom_names:\n+\t\t\t\t\t\tgtf_chrom_names.add(chrom)\n+\t\tfor chrom in lengths.keys():\n+\t\t\tif chrom not in gtf_chrom_names:\n+\t\t\t\tprint "Warning: at least one chromosome name (\'"+chrom+"\') of the file \'"+args.chr_len+"\'does not match any chromosome name if GTF and was ignored."\n+\t\t\t\t#del lengths[chrom]\n+\t\t\t\tbreak\n+\t\tfor chrom in gtf_chrom_names:\n+\t\t\tif force_get_lengths: break\n+\t\t\tif chrom not in lengths.keys():\n+\t\t\t\tprint "WARNING: chromosome name \'"+chrom+"\' was found in gtf and does not match any chromosome name provided in",args.chr_len+". "\n+\t\t\t\tprint "\\t=> The chromosome lenghts will be approximated using annotations in the GTF file."\n+\t\t\t\tcontinue_value =""\n+\t\t\t\twhile continue_value not in {"yes","y","no","n"}:\n+\t\t\t\t\tcontinue_value = raw_input("\\tDo you want to continue (\'yes\' or \'y\')?\\n\\tElse write \'no\' or \'n\' to exit the script and check your file of lengths.\\n")\n+\t\t\t\t\tif continue_value == "no" or continue_value == "n":\n+\t\t\t\t\t\tsys.exit("Exiting")\n+\t\t\t\t\telif continue_value == "yes" or continue_value == "y":\n+\t\t\t\t\t\tforce_get_lengths = True\n+\t\t\t\t\t\tbreak\n+\t\t\t\t\tprint "Error: use \'yes/y/no/n\' only"\n+\t\tif not force_get_lengths:\n+\t\t\treturn lengths\n+\t# Otherwise, (or if at least one chromosome was missing in chromosome lengths file) we consider the end of the last annotation of the chromosome in the GTF file as the chromosome length\n+\twith open(args.annotation, \'r\') as gtf_file:\n+\t\tfor line in gtf_file:\n+\t\t\tif not line.startswith(\'#\'):\n+\t\t\t\tchrom = line.split(\'\\t\')[0]\n+\t\t\t\tend = int(line.split(\'\\t\')[4])\n+\t\t\t\tinit_dict(lengths, chrom, 0)\n+\t\t\t\tlengths[chrom] = max(lengths[chrom], end)\n+\t\tif force_get_lengths:\n+\t\t\tprint "The chromosome lenghts have been approximated using the last annotations in the GTF file."\n+\t\treturn lengths\n+\n+def write_feature_on_index(feat,chrom, start, stop, sign, stranded_genome_index, unstranded_genome_index=None):\n+\tgrouped_by_biotype_features = []\n+\tfor biotype,categs in feat.iteritems():\n+\t\tcateg_list=[]\n+\t\tfor cat in set(categs):\n+\t\t\tcateg_list.append(cat)\n+\t\tgrouped_by_biotype_features.append(":".join((str(biotype),",".join(categ_list))))\n+\tstranded_genome_index.write(\'\\t\'.join((chrom, start, stop, sign,\'\'))+\'\\t\'.join(grouped_by_biotype_features)+\'\\n\')\n+\tif unstranded_genome_index :\n+\t\tunstranded_genome_index.write(\'\\t\'.join((chrom, start, stop, \'.\',\'\'))+\'\\t\'.join(grouped_by_biotype_features)+\'\\n\')\n+\n+\n+def add_info(cpt, feat_values, start, stop, chrom=None, unstranded_genome_index=None, stranded_genome_index = None , biotype_prios=None, coverage=1, cate'..b'mples_files,samples_names,prios,genome_index, options.strandness[0], biotype_prios = None)\n+\n+\t#### Write the counts on disk\n+\twrite_counts_in_files(cpt,cpt_genome)\n+\n+if not (intersect_reads or process_counts) or (options.quiet and options.pdf == False):\n+\tquit("\\n### End of program")\n+print "\\n### Generating plots"\n+# Updating the biotypes lists (biotypes and \'biotype_group1\'): adding the \'unknow biotypes\' found in gtf/index\n+if unknown_feature == []: # \'unknown_feature\' is define only during the index generation\n+\t# Browse the feature to determine whether some biotypes are \'unknown\'\n+\tfor sample,counts in cpt.items():\n+\t\tfor (cat,biot) in counts:\n+\t\t\tif biot not in biotypes and cat not in unknown_feature:\n+\t\t\t\tunknown_feature.append(biot)\n+for new_biot in unknown_feature:\n+\tbiotypes.add(new_biot)\n+\tbiotypes_group1["others"].append(new_biot)\n+biotypes = sorted(biotypes)\n+# move antisense categ to the end of the list\n+biotypes.remove(\'antisense\')\n+biotypes.append(\'antisense\')\n+biotypes_group1 = sorted(biotypes_group1)\n+\n+\n+#print \'\\nCounts for every category/biotype pair: \',cpt\n+\n+# Generating plots\n+if options.pdf != False:\n+\tif options.pdf == None:\n+\t\toptions.pdf = "categories_plots.pdf"\n+\tpdf = PdfPages(options.pdf)\n+else:\n+\tpdf = False\n+\n+selected_biotype = None\n+if options.biotype_filter:\n+\toptions.biotype_filter = options.biotype_filter[0]\n+\tfor sample in cpt:\n+\t\tfor feature in cpt[sample]:\n+\t\t\tbiotype = feature[1]\n+\t\t\tif options.biotype_filter.lower() == biotype.lower():\n+\t\t\t\tselected_biotype=biotype\n+\t\t\t\tbreak\n+\tif selected_biotype == None :\n+\t\tprint "\\nError: biotype \'"+options.biotype_filter+"\' not found. Please check the biotype name and that this biotype exists in your sample(s)."\n+\t\tsys.exit()\n+\n+#Print a warning message if the UTRs are not specified as 5\' or 3\' (they will be ploted as 5\'UTR)\n+if \'UTR\' in [categ[0] for counts in cpt.values() for categ in counts.keys()]:\n+\tprint \'\'\'\\nWARNING: (some) 5\'UTR/3\'UTR are not precisely defined. Consequently, positions annotated as "UTR" will be counted as "5\'UTR"\\n\'\'\'\n+\n+#### Make the plot by categories\n+\t#### Recategorizing with the final categories\n+final_cats=categs_groups[options.categories_depth-1]\n+final_cat_cpt,final_genome_cpt, filtered_cat_cpt = group_counts_by_categ(cpt,cpt_genome,final_cats,selected_biotype)\n+\t#### Display the distribution of specified categories (or biotypes) in samples on a barplot\n+# Remove the \'antisense\' category if the library type is \'unstranded\'\n+for dic in cpt.values():\n+\tif (\'antisense\',\'antisense\') in dic.keys(): break\n+else:\n+\tcat_list.remove(\'antisense\')\n+make_plot(cat_list,samples_names,final_cat_cpt,final_genome_cpt,pdf, "categories",options.threshold, svg = options.svg, png = options.png)\n+if selected_biotype :\n+\tmake_plot(cat_list,samples_names,filtered_cat_cpt,final_genome_cpt,pdf, "categories",options.threshold,title="Categories distribution for \'"+selected_biotype+"\' biotype", svg = options.svg, png = options.png)\n+\n+#### Make the plot by biotypes\n+\t#### Recategorizing with the final categories\n+final_cat_cpt,final_genome_cpt = group_counts_by_biotype(cpt,cpt_genome,biotypes)\n+\t#### Display the distribution of specified categories (or biotypes) in samples on a barplot\n+make_plot(biotypes,samples_names,final_cat_cpt,final_genome_cpt,pdf, "biotypes",options.threshold, svg = options.svg, png = options.png)\n+\n+\n+\n+\t##### Recategorizing with the final categories\n+#final_cat_cpt,final_genome_cpt = group_counts_by_biotype(cpt,cpt_genome,biotypes_group1)\n+\t##### Display the distribution of specified categories (or biotypes) in samples on a barplot\n+#make_plot(biotypes_group1,samples_names,final_cat_cpt,final_genome_cpt,pdf,"Biotype groups", options.threshold, title="Biotypes distribution in mapped reads \\n(biotypes are grouped by \'family\')", svg = options.svg, png = options.png)\n+\n+\n+if options.pdf:\n+\tpdf.close()\n+\tprint "\\n### Plots saved in pdf file: %s" %options.pdf\n+\t\n+print "\\n### End of program"\n\\ No newline at end of file\n' |
b |
diff -r 6010786c9960 -r 86bc5c328db2 alfa/ALFA/tools/alfa/alfa_wrapper.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/alfa/ALFA/tools/alfa/alfa_wrapper.sh Tue Oct 11 06:54:24 2016 -0400 |
[ |
b'@@ -0,0 +1,233 @@\n+#!usr/bin/bash \n+\n+#########################################################################################################\n+# ARGUMENTS FROM alfa_wrapper.xml #\n+#########################################################################################################\n+configFile=$1;\n+logReport=$2;\n+sed -i -e \'/^$/d; s/\\t//g;\' $configFile;\n+printf "__________________________________________________________________\\n\\n" > $logReport\n+printf " ALFA CONFIG \\n" >> $logReport\n+printf "__________________________________________________________________\\n" >> $logReport\n+cat $configFile >> $logReport\n+\n+#########################################################################################################\n+# INITIALIZATION OF THE VARIABLES from $configFile #\n+#########################################################################################################\n+#_INPUT1\n+annotationSource=`grep -P \'^annotationSource ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+if [ "$annotationSource" == "personal_gtf" ]; then\n+\tannotationFile=`grep -P \'^annotationFile ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+elif [ "$annotationSource" == "built_in_index" ]; then\n+\tbuilt_in_index_prefix=`grep -P \'^built_in_index_prefix ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+else\n+\tstrandedIndex=`grep -P \'^strandedIndex ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+\tunstrandedIndex=`grep -P \'^unstrandedIndex ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+fi\n+\n+#_INPUT2\n+readsType=`grep -P \'^readsType ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+readsFileList=`grep -P \'^readsFile\\[[0-9]+\\] ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+readsLabelList=`grep -P \'^readsLabel\\[[0-9]+\\] ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+\n+#_OUTPUT CHOICES\n+plotChoice=`grep -P \'^plotChoice ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+countFileChoice=`grep -P \'^countFileChoice ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+indexChoice=`grep -P \'^indexChoice ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+\n+#_OUTPUT OPTIONS\n+strandness=`grep -P \'^strandness ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+categoriesDepth=`grep -P \'^categoriesDepth ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+plotFormat=`grep -P \'^plotFormat ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+plotThresholdChoice=`grep -P \'^plotThresholdChoice ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+if [ "$plotThresholdChoice" == "True" ]; then\n+\tyMin=`grep -P \'^yMin ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+ \tyMax=`grep -P \'^yMax ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+fi\n+\n+#_OUTPUT FILES\n+if [ "$plotChoice" == "True" ]; then \n+\tif [ "$plotFormat" == "pdf" ]; then\n+\t\toutputPdf=`grep -P \'^outputPdf ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+\telif [ "$plotFormat" == "svg" ]; then\n+\t\toutputCategoriesSvg=`grep -P \'^outputCategoriesSvg ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+\t\toutputBiotypesSvg=`grep -P \'^outputBiotypesSvg ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+\telse\n+\t\toutputCategoriesPng=`grep -P \'^outputCategoriesPng ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+\t\toutputBiotypesPng=`grep -P \'^outputBiotypesPng ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+\tfi\n+fi\n+if [ "$countFileChoice" == "True" ]; then \n+\toutputCountFile=`grep -P \'^outputCountFile ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+fi\n+if [ "$indexChoice" == "True" ]; then \n+\toutputStrandedIndex=`grep -P \'^outputStrandedIndex ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+\toutputUnstrandedIndex=`grep -P \'^outputUnstrandedIndex ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n+fi\n+\n+####################################################'..b'&& [ "$countFileChoice" == "False" ] && [ "$indexChoice" == "False" ]; then\n+cat <<error 1>&2\n+\n+No output to return. \n+Process Aborted\n+error\n+exit 0\n+fi\n+\n+printf "Command:\\n" >> $logReport\n+echo "python ""$scriptPath"ALFA.py $scriptInput $scriptStrandness $scriptCategoriesDepth $scriptPlotOutput >> $logReport;\n+printf "\\n******************************************************************\\n" >> $logReport\n+printf "Temporary Output Directory:\\n" >> $logReport\n+echo $outputDirectory >> $logReport\n+printf "\\n******************************************************************\\n" >> $logReport\n+printf "ALFA prompt:\\n" >> $logReport\n+python "$scriptPath"ALFA.py $scriptInput $scriptStrandness $scriptCategoriesDepth $scriptPlotOutput >> $logReport 2>errorFile;\n+printf "\\n******************************************************************\\n" >> $logReport\n+\n+#########################################################################################################\n+# REDIRECTION OF ERRORS - TMP SOURCE ALFA.PY MUST BE CORRECTED SOON #\n+#########################################################################################################\n+if [[ -s errorFile ]]; then\n+\t#When the option --n is enabled, alfa prints \'### End of the program\' in stderr even if the process worked-\n+\t#The following lines to avoid the tool from crashing in this case\n+\tendProgram=`grep -c \'### End of program\' errorFile`\n+\tif [ "$endProgram" == "0" ]; then\n+\t\t#When alfa prints \'### End of program\' in stdout, all the messages in stderr are considered\n+\t\t#as warnings and not as errors. True errors make the script exits with code "2"\n+\t\tendProgram=`grep -c \'### End of program\' $logReport`\n+\t\tif [ "$endProgram" == "0" ]; then\n+ \t\t\t>&2 printf "The script ALFA.py encountered the following error:\\n\\n"\n+\t\t\t>&2 cat errorFile\n+\t\t\tprintf "ALFA error:\\n" >> $logReport\n+\t\t\tcat errorFile >> $logReport\n+\t\t\tprintf "\\n******************************************************************\\n" >> $logReport\n+ \t\t\texit 2\n+ \t\telse\n+ \t\t\t>&2 printf "The script ALFA.py encountered the following warning:\\n\\n"\n+ \t\t\t>&2 cat errorFile \n+ \t\t\tprintf "ALFA warning:\\n" >> $logReport\n+ \t\t\tcat errorFile >> $logReport\n+\t\t\tprintf "\\n******************************************************************\\n" >> $logReport\n+ \t\tfi\n+ \tfi\n+fi\n+\n+#########################################################################################################\n+# OUTPUT REDIRECTIONS #\n+#########################################################################################################\n+if [ "$plotChoice" == "True" ]; then\n+\tif [ "$plotFormat" == "pdf" ]; then\n+\t\tmv "plotFile.pdf" $outputPdf;\n+\telif [ "$plotFormat" == "png" ]; then\n+\t\tmv "plotFile.categories.png" $outputCategoriesPng;\n+\t\tmv "plotFile.biotypes.png" $outputBiotypesPng;\n+\telse \n+\t\tmv "plotFile.categories.svg" $outputCategoriesSvg;\n+\t\tmv "plotFile.biotypes.svg" $outputBiotypesSvg;\n+\tfi\n+fi\n+if [ "$countFileChoice" == "True" ]; then\n+\t> countFile;\n+\tfor (( i = 1; i <= readsListLen; i++ )) do\n+\t\tprintf "##LABEL: "${readsLabel[$i]}"\\n\\n" >> countFile;\n+\t\tcat ${readsLabel[$i]}".categories_counts" >> countFile;\n+\t\tprintf "__________________________________________________________________\\n" >> countFile;\n+\tdone\n+\tmv countFile $outputCountFile;\n+fi\n+if [ "$indexChoice" == "True" ]; then\n+\tif [ "$annotationSource" == "index" ]; then\n+\t\tmv $strandedIndex $outputStrandedIndex\n+\t\tmv $unstrandedIndex $outputUnstrandedIndex\n+\telif [ "$annotationSource" == "built_in_index" ]; then\n+\t\tcp $built_in_index_prefix".stranded.index" $outputStrandedIndex\n+\t\tcp $built_in_index_prefix".unstranded.index" $outputUnstrandedIndex\n+\telse\n+\t\tannotationFileName=`grep -P -o \'[^/]*\\.dat$\' <<< $annotationFile`\n+\t\tmv $annotationFileName".stranded.index" $outputStrandedIndex\n+\t\tmv $annotationFileName".unstranded.index" $outputUnstrandedIndex\n+\tfi\n+fi\n\\ No newline at end of file\n' |
b |
diff -r 6010786c9960 -r 86bc5c328db2 alfa/ALFA/tools/alfa/alfa_wrapper.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/alfa/ALFA/tools/alfa/alfa_wrapper.xml Tue Oct 11 06:54:24 2016 -0400 |
b |
b'@@ -0,0 +1,322 @@\n+<tool id="alfa" name="ALFA" version="0.1.0">\n+\t<description>- Compute and display distribution of reads by genomic categories</description>\n+\n+\t<!-- ALFA requires bedtools suite v2.20.0 and above -->\n+\t<requirements>\n+ \t<requirement type="package">bedtools</requirement>\n+ \t<requirement type="package">samtools</requirement>\n+ \t<requirement type="package" version="1.5.3">matplotlib</requirement>\n+ \t</requirements>\n+\n+ \t<command interpreter="bash">\n+ \t\talfa_wrapper.sh ${ALFA_config} $logReport\n+ \t</command>\t\n+\t\n+\t<inputs>\n+\t\t<param name="projectName" value="ALFA" type="text" size="20" label="Project Name">\n+\t\t\t<validator type="empty_field" message="Please, specify a name for your project."/>\n+\t\t</param>\n+\n+\t\t<section name="annotation" title="INPUT 1: Annotation File (GTF format)" expanded="True">\n+\t\t\t<conditional name="annotationSource">\n+\t\t\t\t<param name="annotationSourceSelection" type="select" label="Select the source of your annotated sequence/genome">\n+\t\t\t\t\t<option value="personal_gtf" selected="true">Personal annotation file (GTF format)</option>\n+\t\t\t\t\t<option value="index">Stranded and Unstranded Indexes previously generated by ALFA (Index format)</option>\n+\t\t\t\t\t<option value="built_in_index">Built-in indexes among a list of referenced genome (Index format)</option>\n+\t\t\t\t</param>\n+\t\t\t\t<when value="personal_gtf">\n+\t\t\t\t\t<param name="annotationFile" type="data" format="Gff, Gtf" label="Select your personal annotation file (GTF format)">\n+\t\t\t\t\t</param>\n+\t\t\t\t</when>\n+\t\t\t\t<when value="index">\n+\t\t\t\t\t<param name="strandedIndex" type="data" format="index" label="Select your ALFA stranded index file (index format)"/>\n+\t\t\t\t\t<param name="unstrandedIndex" type="data" format="index" label="Select your ALFA Unstranded index file (index format)"/>\n+\t\t\t\t</when>\n+\t\t\t\t<when value="built_in_index">\n+\t\t\t\t\t<param name="built_in_index_prefix" type="select" label="Select Genome">\n+\t\t\t\t\t\t<options from_data_table="alfa_indexes">\n+\t\t\t\t\t\t\t<validator type="no_options" message="No indexes are available for the selected input dataset" />\n+\t\t\t\t\t\t</options>\n+\t\t\t\t\t</param>\n+\t\t\t\t</when>\n+\t\t\t</conditional>\n+\t\t</section>\n+\n+\t\t<section name="reads" title="INPUT 2: Aligned Reads File(s) of the annotated sequence (BAM or BEDGRAPH format)" expanded="True">\n+\t\t\t<conditional name="readsType">\n+\t\t\t\t<param name="readsTypeSelection" type="select" label="Select the format of the reads file(s)">\n+\t\t\t\t\t<option value="bam" selected="true">BAM</option>\n+\t\t\t\t\t<option value="bedgraph">BEDGRAPH</option>\n+\t\t\t\t</param>\n+\t\t\t\t<when value="bam">\n+\t\t\t\t\t<repeat name="readsList" title="Reads File" min="1" >\n+\t\t\t\t\t\t<param name="readsFile" type="data" format="Bam" label="Select the reads file of your annotated sequence (BAM format)"/>\n+\t\t\t\t\t\t<param name="readsLabel" type="text" size="20" value="" label="Label of the reads" optional="True"/>\n+\t\t\t\t\t</repeat>\n+\t\t\t\t</when>\n+\t\t\t\t<when value="bedgraph">\n+\t\t\t\t\t<repeat name="readsList" title="Reads File" min="1">\n+\t\t\t\t\t\t<param name="readsFile" type="data" format="Bed" label="Select the reads file of your annotated sequence (BEDGRAPH format)"/>\n+\t\t\t\t\t\t<param name="readsLabel" type="text" size="20" value="" label="Label of the reads" optional="True"/>\n+\t\t\t\t\t</repeat>\n+\t\t\t\t</when>\n+\t\t\t</conditional>\n+\t\t\t<param name="strandness" type="select" label="Select the strandness of your mapped reads dataset">\n+\t\t\t\t<option value="unstranded" selected="true">Unstranded (reads will match genomic features on both forward and reverse strands of the annotated sequence)</option>\n+\t\t\t\t<option value="forward">Forward (reads will match only genomic features on the forward strand of the annotated sequence)</option>\n+\t\t\t\t<option value="reverse">Reverse (reads will match only genomic features on the reverse strand of the annotated sequence)</option>\n+\t\t\t</param>\n+\t\t</section>\n+\n+\t\t<section name="outputFiles" title="OUTPUT FILES: Choose the output files" expanded="False">\n+\t\t\t<param name="plot" type="boolean" truevalue="True" falsevalue='..b'oy.categories_count" ftype="txt" />\n+\t\t\t<output name="outputStrandedIndex" file="alfa_toy.stranded.index" ftype="txt" />\n+\t\t\t<output name="outputUnstrandedIndex" file="alfa_toy.unstranded.index" ftype="txt" />\n+\t\t\t<assert_stdout>\n+\t\t\t\t<has_text text="### End of the program" />\n+\t\t\t</assert_stdout>\n+\t\t</test>\n+\t</tests>\n+\n+\t<help>\n+**ALFA acronym**\n+\n+- Annotation.Landscape.For.Aligned reads\n+\n+----\n+\n+**What it does**\n+\n+\t| ALFA provides a global overview of features distribution composing New Generation Sequencing dataset(s). \n+\t|\n+ \t| Given a set of aligned reads (BAM files) and an annotation file (GTF format), the tool produces plots of the raw and normalized distributions of those reads among genomic categories (stop codon, 5\'-UTR, CDS, intergenic, etc.) and biotypes (protein coding genes, miRNA, tRNA, etc.). Whatever the sequencing technique, whatever the organism.\n+\n+----\n+\n+**Official documentation of the tool**\n+\n+\n+- https://github.com/biocompibens/ALFA\n+\n+----\n+\n+**Detailed example**\n+\n+- https://github.com/biocompibens/ALFA#detailed-example\n+\n+----\n+\n+**Nota Bene**\n+\n+1. **Input 1: Annotation File**\n+\n+\n+\t| ALFA requires as first input an annotation file (sequence, genome...) in gtf format in order to generate indexes that will be used in a 2nd step of the program.\n+\t| Indexes are files which list all the coordinates of all categories (stop codon, 5\'-UTR, CDS, intergenic...) and biotypes (protein coding genes, miRNA, tRNA, ...) encountered in the annotated sequence.\n+\t\n+.. class:: warningmark\n+\n+Gtf File must be sorted.\n+\n+.. class:: infomark\n+\n+Generation of indexes from an annotation file may be time consuming (i.e ~10min for the human genome). Thus, ALFA allows the user to submit directly indexes generated in previous runs.\n+\n+2. **Input 2: Reads**\n+\n+\t| ALFA requires as second input a single or a set of mapped reads file(s) in either bam or bedgraph format. These files are required to intersect the coordinates of the mapped reads with the associated categories and biotypes on the annotated sequence.\n+\t| The strandness option determines which strand of the annotated sequence will be taken into account during this intersection.\n+\n+.. class:: warningmark\n+\n+Bam or Bedgraph file(s) must be sorted.\n+\n+<!--\n+.. class:: warningmark\n+\n+For oriented reads (either matching the forward strand or the reverse strand), \'forward\' or \'reverse\' strandness must be selected.\n+\n+.. class:: warningmark\n+\n+For paired-end or non-oriented reads, \'unstranded\' strandness must be selected.\n+-->\n+\n+3. **Output files**\n+\n+\t| The result of the intersection is a count file displaying the count of nucleotides in the reads for each genomic categories and biotypes. From this count file, plots of the raw and normalized distributions of the reads among these categories are generated.\n+\t| In the output files section, the user can choose what kind of files he desires as ALFA output. Categories Count File and Plots are proposed by default. \n+\n+.. class:: infomark\n+\n+The user can also select the \'indexes\' option as output. This option is interesting if you plan to run ALFA again with the same submitted annotation file. *See Nota Bene/Input 1: Annotation File for more information.*\n+\n+\n+- `How the plots look like`_\n+\n+.. _How the plots look like: https://github.com/biocompibens/ALFA#plots\n+\n+- `How they are generated`_ \n+\n+.. _How they are generated: https://github.com/biocompibens/ALFA#detailed-example\n+\n+----\n+\n+**ALFA Developpers**\n+\n+\t| Beno\xc3\xaet No\xc3\xabl and Mathieu Bahin: *compbio team, Institut de Biologie de l\'Ecole Normale Sup\xc3\xa9rieure de Paris*\n+\n+\n+ </help>\n+\n+ <citations>\n+ \t<citation type="bibtex">@MISC{\n+ \t\tauthor="Beno\xc3\xaet No\xc3\xabl and Mathieu Bahin"\n+ \t\ttitle="ALFA: Annotation Landscape For Aligned reads"\n+ \t\tcrossref="https://github.com/biocompibens/ALFA"\n+ \t\tinstitution="Institut de Biologie de l\'Ecole Normale Sup\xc3\xa9rieure de Paris"\n+ \t\t}\n+ \t</citation>\n+ </citations>\n+</tool>\n\\ No newline at end of file\n' |