Perl script to run SATSUMA in loop !
...ools/SATSUMA/satsuma-code-0"; # Location of ur SATSUMA my $maxSize = 5000; my $resolution = 5000; my $dotsize = 1; my $cpu=40; my @ids; #Store the ids if ($ARGV[1] eq "ids") { my...2155 days ago
Bash oneliner to extract all ids from a multifasta file
#List of ids - one per line in allIds.txt $ awk 'BEGIN{while((getline0)l[">"$1]=1}/^>/{f=!l[$1]}f' seq.fa # You can play with this f=!l[$1 ] if wanted to extract or not extract the ids1552 days ago
Perl script to extract sequence by Ids from multifasta file !
#!/usr/bin/perl -w use strict; my $idsfile = "$ARGV[0]"; my $seqfile = "$ARGV[1]"; my %ids = (); open FILE, $idsfile; while() { chomp; $ids{$_} += 1; } close FILE; loca...first word in FASTA header if (exists($ids{$id})) { $seq =~ s/^...2110 days ago
1567 days ago
1417 days ago
Sequence Ids conversion files !
ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/ Name Size Date Modified ARCHIVE/ 02/01/2020, 05:30:00 ASN_BINARY/ 03/07/2020, 07:49:00 GENE_INFO/ 03/07/2020, 07:48:00...1417 days ago
Commandline to Extract a list of specific read IDs from a bam file
#Save all the IDs in IDs.txt file #Run it on BAM file samtools view file.bam | fgrep -w -f IDs.txt1011 days ago
Perl onliner to check the ids in two files !
perl -lane 'BEGIN{open(A,"ids2.txt"); while(){chomp; $k{$_}++}} if (defined($k{$F[0]})) {print "$_\t$F[0]\t1"} else {print "$_\tNA\t0"}; ' ids1.txt > aaa.xls942 days ago
Extract the values using ids !
#Awk script awk 'NR==FNR{tgts[$1]; next} $1 in tgts' file1 file2 Look: $ cat file1 11002 10995 48981 79600 $ cat file2 10993 item 0 11002 item...909 days ago
Extract fasta sequences with ids in another file !
#Ids are in test.txt - one ids per line #sequences are in test.fa grep -w -A 2 -f test.txt test.fa --no-group-separator # seqtk seqtk subseq test.fa test.txt #faSomeRecods faSomeRecords in.fa listFile out.fa # seqkit seqkit grep -n -f list.txt sequences.fas > newfile2.fas904 days ago