Question: split all fasta sequences in a multi fasta file from half into two sequences
0
gravatar for manishbiotechie
5 weeks ago by
manishbiotechie0 wrote:

Hi i have a fasta file with many fasta sequences and I want to split all the fasta sequences into two half from middle.. I am new to bioinformatics kindly suggest some tool or perl command

sequence • 129 views
ADD COMMENTlink written 5 weeks ago by manishbiotechie0
1

You should first either use the biostars search utility to look for similar post or you can google like this to get answers from biostars.org.

on google.com : split fasta site:www.biostars.org

So, we recommend you to first look for similar post, try one of the answers mentioned by other users,and then post the issues that you may face adding specific details of the commands use.

We do not encourage providing direct answers. Show us your efforts and we will love to help.

ADD REPLYlink modified 5 weeks ago • written 5 weeks ago by Vijay Lakhujani3.1k

I know how to split a big fasta files into multiple fasta files but my query is to bisect all fasta nucleotide sequences in a fasta file into two halves e.g.

>TC93917
GGCACGAGGCAGAAACCAATTTCAAAACATTATATAAATAGCTAGTTTCAGTACTAGCTG
TGCAACTCAATTATAGAACAATGGCTTCCTCTATGATCTCCTCTTCAGCTATCACTACAG
TTAACCGTGCCTCTCCGGTACAATCCGGTGCGGTGGCTCCATTCGTCGGACTCAAGTCCA
TGGCTGGCTTCCCAATTACAAAGGTCAACAAAGACATTACCTCCATTACAAGCAATGGTG
GAAGAGTAAACTGCATGCAGGTGTGGCCTCCTATTGGCAAGAAGAAGTTTGAGACTCTTT
CATATCTTCCACCATTGACCAGAGAACAATTGGCGAAAGAAGTTGAATACCTTATAAGGA
AGGGATGGGTTGCTTGCTTGGAATTCGAGACCGAGAAAGGATTTGTGTACCGTGAGAACC
ACAGTTCACCAGGATACTATGACGGACGTTACTGGACAATGTGGAAGTTGCCTTTGTTTG
GAGCAACTGATGCTTCTCAAGTGTTGAAGGAGCTTGATGAAGTTGTTGCTGCTTACCCTA
CTGCCTTTGTCCGTATCATCGGATTCGACAATGTTCGTCAAGTTCAATGCATCAGTTTCA
TTGCACACACACCTGATGTTTACTAAGTTCATTGCACTGGAATTTGGAAGAACTTTTTTC
TTCTTCCCATTTATGTTTTGCTTTTAATTTCCATTTCTTTTTCAGGGAAATGTTTTCCTT
CTGTGTTTTTATATTTCTGTTTTTGGATTTGAAAAATGGGATGTATAAGATTAAGAGTTA
ATGAATGAAATGGTTACTTAATTCCCAAAGTACTTAAAAGAATCCATTATCTATGTAGTT
TTCCTTGTTCTGC

into

>TC93917_1
GGCACGAGGCAGAAACCAATTTCAAAACATTATATAAATAGCTAGTTTCAGTACTAGCTG
TGCAACTCAATTATAGAACAATGGCTTCCTCTATGATCTCCTCTTCAGCTATCACTACAG
TTAACCGTGCCTCTCCGGTACAATCCGGTGCGGTGGCTCCATTCGTCGGACTCAAGTCCA
TGGCTGGCTTCCCAATTACAAAGGTCAACAAAGACATTACCTCCATTACAAGCAATGGTG
GAAGAGTAAACTGCATGCAGGTGTGGCCTCCTATTGGCAAGAAGAAGTTTGAGACTCTTT
CATATCTTCCACCATTGACCAGAGAACAATTGGCGAAAGAAGTTGAATACCTTATAAGGA
AGGGATGGGTTGCTTGCTTGGAATTCGAGACCGAGAAAGGATTTGTGTACCGTGAGAACC
ACAGTTC

>TC93917_2
ACCAGGATACTATGACGGACGTTACTGGACAATGTGGAAGTTGCCTTTGTTTG
GAGCAACTGATGCTTCTCAAGTGTTGAAGGAGCTTGATGAAGTTGTTGCTGCTTACCCTA
CTGCCTTTGTCCGTATCATCGGATTCGACAATGTTCGTCAAGTTCAATGCATCAGTTTCA
TTGCACACACACCTGATGTTTACTAAGTTCATTGCACTGGAATTTGGAAGAACTTTTTTC
TTCTTCCCATTTATGTTTTGCTTTTAATTTCCATTTCTTTTTCAGGGAAATGTTTTCCTT
CTGTGTTTTTATATTTCTGTTTTTGGATTTGAAAAATGGGATGTATAAGATTAAGAGTTA
ATGAATGAAATGGTTACTTAATTCCCAAAGTACTTAAAAGAATCCATTATCTATGTAGTT
TTCCTTGTTCTGC

sorry if i asked this simple thing but as i told i am new to bioinfo

ADD REPLYlink modified 5 weeks ago by Vijay Lakhujani3.1k • written 5 weeks ago by manishbiotechie0

Hello manishbiotechie,

Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time.
code_formatting

I know how to split a big fasta files into multiple fasta files

You should explain this by adding your code here. May be people can suggest how you can edit / expand your code.

ADD REPLYlink written 5 weeks ago by Vijay Lakhujani3.1k

Why do you need to [literally] split the sequence in half? It should be possible to do with awk.

ADD REPLYlink written 4 weeks ago by Kevin Blighe30k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1830 users visited in the last hour