From 87f1ddda36391b60414707db23413aba5801de5d Mon Sep 17 00:00:00 2001 From: Jacques Dainat Date: Fri, 13 Oct 2023 07:59:20 +0200 Subject: [PATCH] fix #383 (#402) * sync doc * fix #383 Can't continue outside a when block --------- Co-authored-by: Jacques Dainat --- bin/agat_convert_sp_gff2bed.pl | 8 ++++---- docs/tools/agat_convert_sp_gff2bed.md | 12 ++++++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/bin/agat_convert_sp_gff2bed.pl b/bin/agat_convert_sp_gff2bed.pl index f189be6a..05ec8f88 100755 --- a/bin/agat_convert_sp_gff2bed.pl +++ b/bin/agat_convert_sp_gff2bed.pl @@ -190,11 +190,11 @@ $field12_blockStarts = undef; if($test_nc eq "." and $opt_nc eq "filter"){ - continue; # skip this non-coding feature + # skip this non-coding feature + } else { + # print bed line + print $bedout $line; } - # print bed line - print $bedout $line; - } } } diff --git a/docs/tools/agat_convert_sp_gff2bed.md b/docs/tools/agat_convert_sp_gff2bed.md index bbe9e20e..a71cd62c 100644 --- a/docs/tools/agat_convert_sp_gff2bed.md +++ b/docs/tools/agat_convert_sp_gff2bed.md @@ -4,8 +4,9 @@ The script aims to convert GTF/GXF file into bed file. It will convert level2 features from gff (mRNA, transcripts) into bed features. -If the selected level2 subfeatures (defaut: exon) exist, they will be reported -in the block fields (9-12th colum in bed). +If the selected level2 subfeatures (defaut: exon) exist, they are reported +in the block fields (9-12th colum in bed). CDS Start and End are reported in column +7 and 8 accordingly. Definintion of the bed format: ``` @@ -37,6 +38,13 @@ agat_convert_sp_gff2bed.pl --help Input GFF3 file that will be read +- **--nc** + + STRING - behaviour for non-coding features (e.g. recored wihtout CDS). [keep,filter,transcript] + keep - Default, they are kept but no CDS position is reported in the 7th and 8th columns (a period is reported instead). + filter - We remove them. + transcript - We keep them but values in 7th and 8th columns will contains transcript's start and stop. + - **--sub** Define the subfeature (level3, e.g exon,cds,utr,etc...) to report as blocks in the bed output.