# HG changeset patch # User mvdbeek # Date 1456398574 18000 # Node ID 15ce6435ab8395f4477a416f8a9b95b6dffd5640 # Parent d4b5942ed347e37e2600f4b0f873b68264b7c563 planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/goseq_1_22_0 commit fdd0811efc61c31f88ff17096fbe8ee8cfacd766-dirty diff -r d4b5942ed347 -r 15ce6435ab83 get_length_and_gc_content.r --- a/get_length_and_gc_content.r Thu Feb 25 05:49:08 2016 -0500 +++ b/get_length_and_gc_content.r Thu Feb 25 06:09:34 2016 -0500 @@ -21,9 +21,9 @@ #Load the annotation and reduce it GTF <- import.gff(GTFfile, format="gtf", genome=NA, feature.type="exon") -grl <- reduce(split(GTF, elementMetadata(GTF)$gene_name)) +grl <- reduce(split(GTF, elementMetadata(GTF)$gene_id)) reducedGTF <- unlist(grl, use.names=T) -elementMetadata(reducedGTF)$gene_name <- rep(names(grl), elementLengths(grl)) +elementMetadata(reducedGTF)$gene_id <- rep(names(grl), elementLengths(grl)) #Open the fasta file FASTA <- FaFile(FASTAfile) @@ -39,7 +39,7 @@ width = sum(elementMetadata(x)$widths) c(width, nGCs/width) } -output <- t(sapply(split(reducedGTF, elementMetadata(reducedGTF)$gene_name), calc_GC_length)) +output <- t(sapply(split(reducedGTF, elementMetadata(reducedGTF)$gene_id), calc_GC_length)) colnames(output) <- c("Length", "GC") write.table(output, file="GC_lengths.tsv", sep="\t") \ No newline at end of file diff -r d4b5942ed347 -r 15ce6435ab83 get_length_and_gc_content.xml --- a/get_length_and_gc_content.xml Thu Feb 25 05:49:08 2016 -0500 +++ b/get_length_and_gc_content.xml Thu Feb 25 06:09:34 2016 -0500 @@ -6,7 +6,10 @@ get_length_and_gc_content.r --gtf "$gtf" - --fasta "$fastaSource.fasta" + #if $fastaSource.genomeSource == "indexed": + --fasta "$fastaSource.fasta.fields.path" + #else: + --fasta "$fastaSource.fasta" --output "output"