[ fxtools clip
]
Summary
This command will clip (or truncate) the records to only recover nucleotides within a desired range.
Expected Input
>AP2S1_a
ACTG
>AP2S1_b
ACTT
>AP2S2_a
CCCT
Expected Output
# trims 1 nucleotide from the start and 1 nucleotide from the end
fxtools clip -s 1 -e 1
>AP2S1_a
CT
>AP2S1_b
CT
>AP2S2_a
CC
Usage
# left side clip (10 nucleotides)
fxtools clip -i <fastx> -s 10
# right side clip (10 nucleotides)
fxtools clip -i <fastx> -e 10
# left side clip (5 nucleotides) right side clip (15) nucleotides
fxtools clip -i <fastx> -s 5 -e 15
# clip everything outside of nucleotide range 10-20
fxtools clip -i <fastx> -r 10..20
# clip everything outside range 10-end (equivalent to -s 10)
fxtools clip -i <fastx> -r 10..
# clip everything outside range start-10
fxtools clip -i <fastx> -r ..10