다음과 같은 텍스트 파일이 여러 개 있습니다.
>nexus0013_Pseudomonas_59M
NNNNNNNNNNNNNNNNNNNNNNNNNNNTTGCTAGGTGCCCTGCGCTTCCCTGTGGCTGCCGCCTGGGCCGCCGAGCTCCGCCAGGAACTGCCGGGGGGCACGCAGACCTGGAGCAGCGAAGAACTGCTCAGGCATCCGCAGGCCCGCGACCTGGACATCCCGGCCGACGTCGCCTACCGCCGGAACATGCGCTACCGCGCCGTGCCACTGGCGGCCTTGTTGAAAGGCGTGCATCCCGAAGACCATTTGCAGGCCGTGGCCAGCGATGGCTTCGCCGCCGAGTTGCCGGCCGCCCCGCTGCTCGCCGAACAGGGCTCGCAAGCCTGGCTGGCGATAGAGGATCCGCAGCGCCCCTGGCCGCCGTTGGGCGCCGGCAAGCCGTCCGCCGGGCCGTTCTATCTGGTCTGGAGCAAACCCGAGGAAAAACGCATCGGTCCGGAGCAATGGCCCTTCCAGGTCGTCCGCATCCGCTATCAGCCCCCTCTGGCCGAACGCTTCCCGGCCCTGCTGCCGGCCGCCGACGCCAGCGCGGAAGTGCGCGCCGGCTTCGCCGTGTTCCAGAAGAACTGCCTGGCCTGCCACCGTCTCAACGGTGCCGGCGACGCCCAGTTCGGCCCGGACCTGAACCTGCCGTACAACCCCACCGAGTACTTCCAGCCGCAATTCCTCTCCCGCTACATCCGCGACCCGCAGGCGCTGCGGCAATGGCCACAGGCGAAAATGCCGGCGTTCCCGGAACGGGTGATCGACGACCAGGAGTTGCGCCAGTTGATCGGCTACTTGCGCCACATGGCCGGCCGCAAGGCGGGCGCGGCCGGCTGA
>nexus0013_Pseudomonas_62M
ATGCCTGTCACTCTCCCGCGCCTGGCGTTGCTAGGTGCCCTGCTCTTCCCTGTGGCTGCCGCCTGGGCCGCCGAGCTCCGCCTGGAACTGCCGGGGGGCACGCAGACCTGGAGCAGCGAAGAACTGCTCAGGCATCCGCAGGCCCGCGACCTGGACATCCCGGCCGACGTCGCCTACCGCCGGAACATGCGCTACCGCGCCGTGCCAC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ACCGAGTACTTCCAGCCGCAATTCCTCTCCCGCTACATCCGCGACCCGCAGGCGCTGCGGCAATGGCCACAGGCGAAAATGCCGGCGTTCCCGGAACGGGTGATCGACGACCAGGAGTTGCGCCAGTTGATCGGCTACTTGCGCCACATGGCCGGCCGCAAGGCGGGCGCGGCCGGCTGA
>nexus0013_Pseudomonas_61M
ATGCCTGTCACTCTCCCGCGCCTGGCGTTGCTAGGTGCCCTGCTCTTCCCTGTGGCTGCCGCCTGGGCCGCCGAGCTCCGCCTGGAACTGCCGGGGGGCACGCAGACCTGGAGCAGCGAAGAACTGCTCAGGCATCCGCAGGCCCGCGACCTGGACATCCCGGCCGACGTCGCCTACCGCCGGAACATGCGCTACCGCGCCGTGCCACTGGCGGCCTTGTTGAAAGGCGTGCATCCCGAAGACCATTTGCAGGCCGTGGCCAGCGATGGCTTCGCCGCCGAGTTGCCGGCCGCCCCGCTGCTCGCCGAACAGGGCTCGCAAGCCTGGCTGGCGATAGAGGATCCGCAGCGCCCCTGGCCGCCGTTGGGCGCCGGCAAGCCGTCCGCCGGGCCGTTCTATCTGGTCTGGAGCAAACCCGAGGAAAAACGCATCGGTCCGGAGCAATGGCCCTTCCAGGTCGTCCGCATCCGCTATCAGCCCCCTCTGGCCGAACGCTTCCCGGCCCTGCTGCCGGCCGCCGACGCCAGCGCGGAAGTGCGCGCCGGCTTCGCCGTGTTCCAGAAGAACTGCCTGGCCTGCCACCGTCTCAACGGTGCCGGCGACGCCCAGTTCGGCCCGGACCTGAACCTGCCGTACAACCCCACCGAGTACTTCCAGCCGCAATTCCTCTCCCGCTACATCCGCGACCCGCAGGCGCTGCGGCAATGGCCACAGGCGAAAATGCCGGCGTTCCCGGAACGGGTGATCGACGACCAGGAGTTGCGCCAGTTGATCGGCTACTTGCGCCACATGGCCGGCCGCAAGGCGGGCGCGGCCGGCTGA
헤더(">" 뒤의 모든 항목)와 해당 시퀀스를 다음 줄에 정렬하여 다음과 같이 오름차순으로 정렬하고 싶습니다.
>nexus0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ATCCGCGACCCGCAGGCGCTGCGGCAATGGCCACAGGCGAAAATGCCGGCGTTCCCGGAACGGGTGATCGACGACCAGGAGTTGCGCCAGTTGATCGGCTACTTGCGCCACATGGCCGGCCGCAAGGCGGGCGCGGCCGGCTGA
>nexus0013_Pseudomonas_62M
ATGCCTGTCACTCTCCCGCGCCTGGCGTTGCTAGGTGCCCTGCTCTTCCCTGTGGCTGCCGCCTGGGCCGCCGAGCTCCGCCTGGAACTGCCGGGGGGCACGCAGACCTGGAGCAGCGAAGAACTGCTCAGGCATCCGCAGGCCCGCGACCTGGACATCCCGGCCGACGTCGCCTACCGCCGGAACATGCGCTACCGCGCCGTGCCACTGGCGGCCTTGTTGAAAGGCGTGCATCCCGAAGACCATTTGCAGGCCGTGGCCAGCGATGGCTTCGCCGCCGAGTTGCCGGCCGCCCCGCTGCTCGCCGAACAGGGCTCGCAAGCCTGGCTGGCGATAGAGGATCCGCAGCGCCCCTGGCCGCCGTTGGGCGCCGGCAAGCCGTCCGCCGGGCCGTTCTATCTGGTCTGGAGCAAACCCGAGGAAAAACGCATCGGTCCGGAGCAATGGCCCTTCCAGGTCGTCCGCATCCGCTATCAGCCCCCTCTGGCCGAACGCTTCCCGGCCCTGCTGCCGGCCGCCGACGCCAGCGCGGAAGTGCGCGCCGGCTTCGCCGTGTTCCAGAAGAACTGCCTGGCCTGCCACCGTCTCAACGGTGCCGGCGACGCCCAGTTCGGCCCGGACCTGAACCTGCCGTACAACCCCACCGAGTACTTCCAGCCGCAATTCCTCTCCCGCTACATCCGCGACCCGCAGGCGCTGCGGCAATGGCCACAGGCGAAAATGCCGGCGTTCCCGGAACGGGTGATCGACGACCAGGAGTTGCGCCAGTTGATCGGCTACTTGCGCCACATGGCCGGCCGCAAGGCGGGCGCGGCCGGCTGA
*이 예에서는 56M과 같이 숫자가 누락되는 경우도 있습니다.
답변1
사용 sed
:
sed -i -e 's/ /\n/' <(sort -n <(sed -e 'N;s/\n/ /' in.txt))
설명하다:
- parts
sed -e 'N;s/\n/ /' in.txt
, 두 줄을 하나의 공백으로 연결하는 것 sort -n
수치정렬을 수행하는 부분- 그런 다음
sed -e 's/ /\n/'
그 사이의 단일 공백을 기준으로 선을 두 개의 별도 선으로 나눕니다. -i
변경 사항은 입력 파일에 기록되며, 사용-i.bak
시 입력 파일에서 먼저 백업됩니다.
답변2
awk '/^>/ { printf "%s ",$0; next; } { print; }' file1 |
sort -n |
awk '{ print $1; print $2; }'
답변3
Schwartzian
변환을 사용하여 이 작업을 수행할 수 있습니다 Perl
.
perl -ne '
push @A, $_.=<>}{
print for
# Schwartzian transform
map { $_->[0] } # recover the line
sort { $a->[1] <=> $b->[1] } # do the sorting using the key
map { [$_,/_(\d+)M$/m] } # setup: line(zeroth-indexed) + sorting key(first index)
@A; # operate on elements of array @A
' yourfile
결과
>nexus0013_Pseudomonas_53M
.....................................
>nexus0013_Pseudomonas_54M
.....................................
>nexus0013_Pseudomonas_55M
.....................................
>nexus0013_Pseudomonas_57M
.....................................
>nexus0013_Pseudomonas_58M
.....................................
>nexus0013_Pseudomonas_59M
.....................................
>nexus0013_Pseudomonas_60M
.....................................
>nexus0013_Pseudomonas_61M
.....................................
>nexus0013_Pseudomonas_62M
.....................................
파일을 행 쌍으로 배열에 채웁니다 @A
. 그런 다음 eof에서 Schwartzian
"map->sort->map" 작업을 수행합니다 . 여기에서는 전체 라인 + 정렬된 데이터를 전달하고 작업의 마지막 단계에서 정렬 후 라인을 복원합니다. 따라서 이 경우 정렬 키는 행 경계에서 M 앞의 숫자입니다. (다음 줄을 추가했음을 기억하세요)