Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add agat sp clip n seq extremities and fix coordinates #125

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- `agat/agat_convert_embl2gff`: convert an EMBL file into GFF format (PR #99).
- `agat/agat_convert_sp_gff2tsv`: convert gtf/gff file into tabulated file (PR #102).
- `agat/agat_convert_sp_gxf2gxf`: fixes and/or standardizes any GTF/GFF file into full sorted GTF/GFF file (PR #103).
- `agat/agat_sp_clipn_seqextremities_and_fixcoordinates`: clip the N's extremities of the sequences (PR #125).

* `bedtools`:
- `bedtools/bedtools_intersect`: Allows one to screen for overlaps between two sets of genomic features (PR #94).
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: agat_sp_clipn_seqextremities_and_fixcoordinates
namespace: agat
description: |
The script aims to clip the N's extremities of the sequences. The
annotations from the sequence clipped are modified accordingly to stay
consistent.
keywords: [gene annotations, GFF]
links:
homepage: https://github.com/NBISweden/AGAT
documentation: https://agat.readthedocs.io/en/latest/tools/agat_sp_clipN_seqExtremities_and_fixCoordinates.html
issue_tracker: https://github.com/NBISweden/AGAT/issues
repository: https://github.com/NBISweden/AGAT
references:
doi: 10.5281/zenodo.3552717
license: GPL-3.0
requirements:
- commands: [agat]
authors:
- __merge__: /src/_authors/leila_paquay.yaml
roles: [ author, maintainer ]
argument_groups:
- name: Inputs
arguments:
- name: --gff
alternatives: [-g, -ref]
description: Input GTF/GFF file.
type: file
required: true
direction: input
example: input.gff
- name: --fasta
alternatives: [-f]
description: Input fasta file.
type: file
required: true
direction: input
example: input.fasta
- name: Outputs
arguments:
- name: --output_fasta
alternatives: [--of]
description: Output fixed fasta file.
type: file
direction: output
required: true
example: output.fasta
- name: --output_gff
alternatives: [--og]
description: Output fixed GFF file.
type: file
direction: output
required: true
example: output_fixed.gff
- name: Arguments
arguments:
- name: --config
alternatives: [-c]
description: |
AGAT config file. By default AGAT takes the original agat_config.yaml shipped with AGAT. The `--config` option gives you the possibility to use your own AGAT config file (located elsewhere or named differently).
type: file
required: false
example: custom_agat_config.yaml
resources:
- type: bash_script
path: script.sh
test_resources:
- type: bash_script
path: test.sh
- type: file
path: test_data
engines:
- type: docker
image: quay.io/biocontainers/agat:1.4.0--pl5321hdfd78af_0
setup:
- type: docker
run: |
agat --version | sed 's/AGAT\s\(.*\)/agat: "\1"/' > /var/software_versions.txt
runners:
- type: executable
- type: nextflow
69 changes: 69 additions & 0 deletions src/agat/agat_sp_clipn_seqextremities_and_fixcoordinates/help.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
```sh
agat_sp_clipN_seqExtremities_and_fixCoordinates.pl --help
```

------------------------------------------------------------------------------
| Another GFF Analysis Toolkit (AGAT) - Version: v1.4.0 |
| https://github.com/NBISweden/AGAT |
| National Bioinformatics Infrastructure Sweden (NBIS) - www.nbis.se |
------------------------------------------------------------------------------


Name:
agat_sp_clipN_seqExtremities_and_fixCoordinates.pl

Description:
The script aims to clip the N's extremities of the sequences. The
annotation from the sequence clipped are modified accrodingly to stay
consistent

Usage:
agat_sp_clipN_seqExtremities_and_fixCoordinates.pl -g infile.gff -f infile.fasta [ -o outfile ]
agat_sp_clipN_seqExtremities_and_fixCoordinates.pl --help

Options:
-g, --gff or -ref
Input GTF/GFF file.

-f or --fasta
Input fasta file.

--of Output fixed fasta file. If no output file is specified, the
output will be written to STDOUT.

--og Output fixed GFF file. If no output file is specified, the
output will be written to STDOUT

-c or --config
String - Input agat config file. By default AGAT takes as input
agat_config.yaml file from the working directory if any,
otherwise it takes the orignal agat_config.yaml shipped with
AGAT. To get the agat_config.yaml locally type: "agat config
--expose". The --config option gives you the possibility to use
your own AGAT config file (located elsewhere or named
differently).

-h or --help
Display this helpful text.

Feedback:
Did you find a bug?:
Do not hesitate to report bugs to help us keep track of the bugs and
their resolution. Please use the GitHub issue tracking system available
at this address:

https://github.com/NBISweden/AGAT/issues

Ensure that the bug was not already reported by searching under Issues.
If you're unable to find an (open) issue addressing the problem, open a new one.
Try as much as possible to include in the issue when relevant:
- a clear description,
- as much relevant information as possible,
- the command used,
- a data sample,
- an explanation of the expected behaviour that is not occurring.

Do you want to contribute?:
You are very welcome, visit this address for the Contributing
guidelines:
https://github.com/NBISweden/AGAT/blob/master/CONTRIBUTING.md
13 changes: 13 additions & 0 deletions src/agat/agat_sp_clipn_seqextremities_and_fixcoordinates/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

set -eo pipefail

## VIASH START
## VIASH END

agat_sp_clipN_seqExtremities_and_fixCoordinates.pl \
--gff "$par_gff" \
--fasta "$par_fasta" \
--of "$par_output_fasta" \
--og "$par_output_gff" \
${par_config:+--config "${par_config}"}
45 changes: 45 additions & 0 deletions src/agat/agat_sp_clipn_seqextremities_and_fixcoordinates/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

set -eo pipefail

## VIASH START
## VIASH END

test_dir="${meta_resources_dir}/test_data"

# create temporary directory and clean up on exit
TMPDIR=$(mktemp -d "$meta_temp_dir/$meta_functionality_name-XXXXXX")
function clean_up {
[[ -d "$TMPDIR" ]] && rm -rf "$TMPDIR"
}
trap clean_up EXIT

echo "> Run $meta_name with test data"
"$meta_executable" \
--gff "$test_dir/input.gff" \
--fasta "$test_dir/input.fasta" \
--output_fasta "$TMPDIR/output.fasta" \
--output_gff "$TMPDIR/output.gff"

echo ">> Checking output"
[ ! -f "$TMPDIR/output.gff" ] && echo "Output file output.gff does not exist" && exit 1
[ ! -f "$TMPDIR/output.fasta" ] && echo "Output file output.fasta does not exist" && exit 1

echo ">> Check if output is empty"
[ ! -s "$TMPDIR/output.gff" ] && echo "Output file output.gff is empty" && exit 1
[ ! -s "$TMPDIR/output.fasta" ] && echo "Output file output.fasta is empty" && exit 1

echo ">> Check if output matches expected output"
diff "$TMPDIR/output.gff" "$test_dir/output.gff"
if [ $? -ne 0 ]; then
echo "Output file output.gff does not match expected output"
exit 1
fi

diff "$TMPDIR/output.fasta" "$test_dir/output.fasta"
if [ $? -ne 0 ]; then
echo "Output file output.fasta does not match expected output"
exit 1
fi

echo "> Test successful"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
>chr1
NNNNNNATGCGTACGTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTA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GCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
##gff-version 3
chr1 maker gene 1000 2000 . + . ID=gene1;Name=Gene1
chr1 maker mRNA 1050 1500 . + . ID=mRNA1;Parent=gene1;Name=mRNA1
chr1 maker exon 1050 1100 . + . ID=exon1;Parent=mRNA1
chr1 maker exon 1400 1500 . + . ID=exon2;Parent=mRNA1
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
>chr1
ATGCGTACGTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCT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TAGCTAGCTAGCTAG
CTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCTAG
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
##gff-version 3
chr1 maker gene 1044 1494 . + . ID=gene1;Name=Gene1
chr1 maker mRNA 1044 1494 . + . ID=mRNA1;Parent=gene1;Name=mRNA1
chr1 maker exon 1044 1094 . + . ID=exon1;Parent=mRNA1
chr1 maker exon 1394 1494 . + . ID=exon2;Parent=mRNA1
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/bin/bash

input_gff="src/agat/agat_sp_clipn_seqextremities_and_fixcoordinates/test_data/input.gff"

cat <<EOL > $input_gff
##gff-version 3
chr1 maker gene 1000 2000 . + . ID=gene1;Name=Gene1
chr1 maker mRNA 1050 1500 . + . ID=mRNA1;Parent=gene1;Name=mRNA1
chr1 maker exon 1050 1100 . + . ID=exon1;Parent=mRNA1
chr1 maker exon 1400 1500 . + . ID=exon2;Parent=mRNA1
EOL

input_fasta="src/agat/agat_sp_clipn_seqextremities_and_fixcoordinates/test_data/input.fasta"

cat <<EOL > $input_fasta
>chr1
NNNNNNATGCGTACGTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGC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TAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
EOL

output_gff="src/agat/agat_sp_clipn_seqextremities_and_fixcoordinates/test_data/output.gff"

cat <<EOL > $output_gff
##gff-version 3
chr1 maker gene 1044 1494 . + . ID=gene1;Name=Gene1
chr1 maker mRNA 1044 1494 . + . ID=mRNA1;Parent=gene1;Name=mRNA1
chr1 maker exon 1044 1094 . + . ID=exon1;Parent=mRNA1
chr1 maker exon 1394 1494 . + . ID=exon2;Parent=mRNA1
EOL

output_fasta="src/agat/agat_sp_clipn_seqextremities_and_fixcoordinates/test_data/output.fasta"

cat <<EOL > $output_fasta
>chr1
ATGCGTACGTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAG
CTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCT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