Cannot access PRIDE database through BioMart in R, was this mart taken out of the biomRt package? - protein-database

I am following the tutorial linked here under the section titled: "listMarts, listDatasets and useMart for the Ensembl mirrors". I want to access the "pride" database, but it doesn't show up for me when I run the code below.
Tutorial code: listMarts(host="uswest.ensembl.org")
biomart version
1 ENSEMBL_MART_ENSEMBL Ensembl Genes 79
2 ENSEMBL_MART_SNP Ensembl Variation 79
3 ENSEMBL_MART_FUNCGEN Ensembl Regulation 79
4 ENSEMBL_MART_VEGA Vega 59
5 pride PRIDE (EBI UK)
My code:
Trial 1:
listMarts()
biomart version
1 ENSEMBL_MART_ENSEMBL Ensembl Genes 107
2 ENSEMBL_MART_MOUSE Mouse strains 107
3 ENSEMBL_MART_SNP Ensembl Variation 107
4 ENSEMBL_MART_FUNCGEN Ensembl Regulation 107
Trial 2:
listMarts(host="uswest.ensembl.org")
biomart version
1 ENSEMBL_MART_ENSEMBL Ensembl Genes 107
2 ENSEMBL_MART_MOUSE Mouse strains 107
3 ENSEMBL_MART_SNP Ensembl Variation 107
4 ENSEMBL_MART_FUNCGEN Ensembl Regulation 107
I also tried the other two host mirror, but the result is the same as trial 1 and 2.
Does anyone know if the pride database was taken out of BioMart?
How could I work around this issue?
Thanks!

Related

PowerShell - How to get the Tags and Comments property of a file [duplicate]

I want to edit the "Comments" Field of a file.
I see several examples how to read the files metadata, but am not seeing how to edit the files metadata?
Judging by this forum thread, you can only read such extended document properties via the Windows (GUI) shell (the Shell.Application COM API) - see next section.
For updating (editing) properties via .NET / PowerShell:
Unofficial 3rd-party NuGet packages that are .NET wrappers around Windows APIs may offer a solution, as demonstrated in this C# answer. Note that many variations of these packages (Microsoft.WindowsAPICodePack.*) exist in the NuGet gallery, with many forks of earlier, seemingly abandoned packages. An example of a fork that still appears to be maintained is this repo.
For image files, specifically, a standard .NET API does exist, although updating properties requires workarounds: see System.Drawing.Image.GetPropertyItem
Otherwise, you must use an application-specific API, such as the various COM libraries for Microsoft Office applications; e.g., New-Object -ComObject Word.Application; this documentation may provide further information.
Note that interactively, modifying - but not adding - properties via the Properties dialog in File Explorer may be possible, if a File Explorer extension is installed for a given document type (such as for Microsoft Word *.docx files).
Reading document properties programmatically:
$file = 'C:\path\to\some\file.doc'
# The index of the property to retrieve.
$propIndex = 24 # Comments
$folder = (New-Object -ComObject Shell.Application).NameSpace((Split-Path $file))
# Output the value of the "Comments" property.
$folder.GetDetailsOf(
$folder.ParseName((Split-Path -Leaf $file)),
24
)
Note that all property values are returned as strings, and that if the targeted property is not filled in, the empty string ('') is returned ; try 0 (the file's name) as a standard property to verify that the call works in principle.
Here's code that finds the indices of all supported property names:
$folder = (New-Object -ComObject Shell.Application).NameSpace("$pwd")
# Note: Assumes that no indices higher than 1000 exist.
0..1000 | % {
if ($n = $folder.GetDetailsOf($null, $_)) {
[pscustomobject] #{ Index = $_; Name = $n }
}
}
On my Windows 10 machine this yields:
Index Name
----- ----
0 Name
1 Size
2 Item type
3 Date modified
4 Date created
5 Date accessed
6 Attributes
7 Offline status
8 Availability
9 Perceived type
10 Owner
11 Kind
12 Date taken
13 Contributing artists
14 Album
15 Year
16 Genre
17 Conductors
18 Tags
19 Rating
20 Authors
21 Title
22 Subject
23 Categories
24 Comments
25 Copyright
26 #
27 Length
28 Bit rate
29 Protected
30 Camera model
31 Dimensions
32 Camera maker
33 Company
34 File description
35 Masters keywords
36 Masters keywords
42 Program name
43 Duration
44 Is online
45 Is recurring
46 Location
47 Optional attendee addresses
48 Optional attendees
49 Organizer address
50 Organizer name
51 Reminder time
52 Required attendee addresses
53 Required attendees
54 Resources
55 Meeting status
56 Free/busy status
57 Total size
58 Account name
60 Task status
61 Computer
62 Anniversary
63 Assistant's name
64 Assistant's phone
65 Birthday
66 Business address
67 Business city
68 Business country/region
69 Business P.O. box
70 Business postal code
71 Business state or province
72 Business street
73 Business fax
74 Business home page
75 Business phone
76 Callback number
77 Car phone
78 Children
79 Company main phone
80 Department
81 E-mail address
82 E-mail2
83 E-mail3
84 E-mail list
85 E-mail display name
86 File as
87 First name
88 Full name
89 Gender
90 Given name
91 Hobbies
92 Home address
93 Home city
94 Home country/region
95 Home P.O. box
96 Home postal code
97 Home state or province
98 Home street
99 Home fax
100 Home phone
101 IM addresses
102 Initials
103 Job title
104 Label
105 Last name
106 Mailing address
107 Middle name
108 Cell phone
109 Nickname
110 Office location
111 Other address
112 Other city
113 Other country/region
114 Other P.O. box
115 Other postal code
116 Other state or province
117 Other street
118 Pager
119 Personal title
120 City
121 Country/region
122 P.O. box
123 Postal code
124 State or province
125 Street
126 Primary e-mail
127 Primary phone
128 Profession
129 Spouse/Partner
130 Suffix
131 TTY/TTD phone
132 Telex
133 Webpage
134 Content status
135 Content type
136 Date acquired
137 Date archived
138 Date completed
139 Device category
140 Connected
141 Discovery method
142 Friendly name
143 Local computer
144 Manufacturer
145 Model
146 Paired
147 Classification
148 Status
149 Status
150 Client ID
151 Contributors
152 Content created
153 Last printed
154 Date last saved
155 Division
156 Document ID
157 Pages
158 Slides
159 Total editing time
160 Word count
161 Due date
162 End date
163 File count
164 File extension
165 Filename
166 File version
167 Flag color
168 Flag status
169 Space free
172 Group
173 Sharing type
174 Bit depth
175 Horizontal resolution
176 Width
177 Vertical resolution
178 Height
179 Importance
180 Is attachment
181 Is deleted
182 Encryption status
183 Has flag
184 Is completed
185 Incomplete
186 Read status
187 Shared
188 Creators
189 Date
190 Folder name
191 Folder path
192 Folder
193 Participants
194 Path
195 By location
196 Type
197 Contact names
198 Entry type
199 Language
200 Date visited
201 Description
202 Link status
203 Link target
204 URL
208 Media created
209 Date released
210 Encoded by
211 Episode number
212 Producers
213 Publisher
214 Season number
215 Subtitle
216 User web URL
217 Writers
219 Attachments
220 Bcc addresses
221 Bcc
222 Cc addresses
223 Cc
224 Conversation ID
225 Date received
226 Date sent
227 From addresses
228 From
229 Has attachments
230 Sender address
231 Sender name
232 Store
233 To addresses
234 To do title
235 To
236 Mileage
237 Album artist
238 Sort album artist
239 Album ID
240 Sort album
241 Sort contributing artists
242 Beats-per-minute
243 Composers
244 Sort composer
245 Disc
246 Initial key
247 Part of a compilation
248 Mood
249 Part of set
250 Period
251 Color
252 Parental rating
253 Parental rating reason
254 Space used
255 EXIF version
256 Event
257 Exposure bias
258 Exposure program
259 Exposure time
260 F-stop
261 Flash mode
262 Focal length
263 35mm focal length
264 ISO speed
265 Lens maker
266 Lens model
267 Light source
268 Max aperture
269 Metering mode
270 Orientation
271 People
272 Program mode
273 Saturation
274 Subject distance
275 White balance
276 Priority
277 Project
278 Channel number
279 Episode name
280 Closed captioning
281 Rerun
282 SAP
283 Broadcast date
284 Program description
285 Recording time
286 Station call sign
287 Station name
288 Summary
289 Snippets
290 Auto summary
291 Relevance
292 File ownership
293 Sensitivity
294 Shared with
295 Sharing status
297 Product name
298 Product version
299 Support link
300 Source
301 Start date
302 Sharing
303 Availability status
304 Status
305 Billing information
306 Complete
307 Task owner
308 Sort title
309 Total file size
310 Legal trademarks
311 Video compression
312 Directors
313 Data rate
314 Frame height
315 Frame rate
316 Frame width
317 Spherical
318 Stereo
319 Video orientation
320 Total bitrate
off the top of my head, I think you might be able to do it with by playing with the COM object
$myFileObj = Get-Item -Path "C:\path\to\file"
$shellCom = New-Object -ComObject Shell.Application
$sDirectory = $shellCom.NameSpace($myFileObj.Directory.FullName)
$sFile = $sDirectory.ParseName($myFileObj.Name)
Now do a Get-Member on the $sFile object, so $sFile | Get-Member. If you see that the property Comments has a setter, you should be able to change it. It'll have {get} {set} under Definition. Setting it should be as easy as $sFile.Comments = "blah blah blah"

SPSS Merging Data with duplicate Keys

I am currently attempting to join 2 datasets using SPSS syntax but am struggling as I have duplicate values on the keys. I would like for the joined data to be duplicated for each instance of the key on the source dataset (or other way round as it doesn't matter which is the source).
The datasets are like the following -
Data1 (3rd column placeholder)
batch
run
date
A
1
1
A
2
1
A
3
1
B
1
1
C
1
1
C
2
1
D
1
1
E
1
1
Data2
batch
Value1
Value2
A
1
21
A
2
22
A
3
23
A
4
24
B
5
25
B
6
26
B
7
27
B
8
28
C
9
29
C
10
30
C
11
31
C
12
32
D
13
33
D
14
34
D
15
35
D
16
36
E
17
37
E
18
38
E
19
39
E
20
40
Current attempt
What I have just now is a method where I CASETOVARS on Data1 before matching it onto Data2 and then VARSTOCASES to expand it out. This works perfectly with my test data but, unfortunately, it requires that I know exactly how many 'runs' there will be. That will not be known in production. It could be 1 or more.
Is there a method to join these datasets while expanding the joined data into the multliple cases in the source?
I am open to using macros but am not able to utilise Python solutions for this (which would probably be easier!).
edit - Unfortunately, extensions are also not possible for me to use.
CASESTOVARS
/ID = batch .
DATASET ACTIVATE data2 .
MATCH FILES
/FILE = *
/TABLE = data1
/BY batch .
EXECUTE .
VARSTOCASES
/MAKE run FROM BATCH_RUN_ID.1 TO BATCH_RUN_ID.3 .
EXECUTE .
If Python and dependent extention command are not availabe, here's an idea how to solve the dynamic list length for the varstocases phase.
What you'll do is basically to create a new dataset with the maximum number of runs possible, attach your read dataset to it, and then set the varstocases to go for that maximum number of runs (blank rows are dropped automatically):
dataset name orig.
data list free/throwthisrow (f1) BATCH_RUN_ID.1 to BATCH_RUN_ID.50 (50F8.2) .
begin data
1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
end data.
add files /file=* /file=orig .
EXECUTE.
select if missing(throwthisrow).
VARSTOCASES
/MAKE run FROM BATCH_RUN_ID.1 TO BATCH_RUN_ID.50 /drop throwthisrow.
EXECUTE .
To complete your present approach you can use spssinc select variables extention command (see examples of use here and here and here). You will use it to automatically create a list of the variables you want to name in your varstocases command, so that the syntax will automatically adapt itself to the number of runs in the data:
So after varstocases and match files:
spssinc select variables macroname="!from" /properties pattern = "BATCH_RUN_ID".
VARSTOCASES /MAKE run FROM !from .

Use PowerShell to edit a file's metadata (Details tab of a file in Windows file explorer)

I want to edit the "Comments" Field of a file.
I see several examples how to read the files metadata, but am not seeing how to edit the files metadata?
Judging by this forum thread, you can only read such extended document properties via the Windows (GUI) shell (the Shell.Application COM API) - see next section.
For updating (editing) properties via .NET / PowerShell:
Unofficial 3rd-party NuGet packages that are .NET wrappers around Windows APIs may offer a solution, as demonstrated in this C# answer. Note that many variations of these packages (Microsoft.WindowsAPICodePack.*) exist in the NuGet gallery, with many forks of earlier, seemingly abandoned packages. An example of a fork that still appears to be maintained is this repo.
For image files, specifically, a standard .NET API does exist, although updating properties requires workarounds: see System.Drawing.Image.GetPropertyItem
Otherwise, you must use an application-specific API, such as the various COM libraries for Microsoft Office applications; e.g., New-Object -ComObject Word.Application; this documentation may provide further information.
Note that interactively, modifying - but not adding - properties via the Properties dialog in File Explorer may be possible, if a File Explorer extension is installed for a given document type (such as for Microsoft Word *.docx files).
Reading document properties programmatically:
$file = 'C:\path\to\some\file.doc'
# The index of the property to retrieve.
$propIndex = 24 # Comments
$folder = (New-Object -ComObject Shell.Application).NameSpace((Split-Path $file))
# Output the value of the "Comments" property.
$folder.GetDetailsOf(
$folder.ParseName((Split-Path -Leaf $file)),
24
)
Note that all property values are returned as strings, and that if the targeted property is not filled in, the empty string ('') is returned ; try 0 (the file's name) as a standard property to verify that the call works in principle.
Here's code that finds the indices of all supported property names:
$folder = (New-Object -ComObject Shell.Application).NameSpace("$pwd")
# Note: Assumes that no indices higher than 1000 exist.
0..1000 | % {
if ($n = $folder.GetDetailsOf($null, $_)) {
[pscustomobject] #{ Index = $_; Name = $n }
}
}
On my Windows 10 machine this yields:
Index Name
----- ----
0 Name
1 Size
2 Item type
3 Date modified
4 Date created
5 Date accessed
6 Attributes
7 Offline status
8 Availability
9 Perceived type
10 Owner
11 Kind
12 Date taken
13 Contributing artists
14 Album
15 Year
16 Genre
17 Conductors
18 Tags
19 Rating
20 Authors
21 Title
22 Subject
23 Categories
24 Comments
25 Copyright
26 #
27 Length
28 Bit rate
29 Protected
30 Camera model
31 Dimensions
32 Camera maker
33 Company
34 File description
35 Masters keywords
36 Masters keywords
42 Program name
43 Duration
44 Is online
45 Is recurring
46 Location
47 Optional attendee addresses
48 Optional attendees
49 Organizer address
50 Organizer name
51 Reminder time
52 Required attendee addresses
53 Required attendees
54 Resources
55 Meeting status
56 Free/busy status
57 Total size
58 Account name
60 Task status
61 Computer
62 Anniversary
63 Assistant's name
64 Assistant's phone
65 Birthday
66 Business address
67 Business city
68 Business country/region
69 Business P.O. box
70 Business postal code
71 Business state or province
72 Business street
73 Business fax
74 Business home page
75 Business phone
76 Callback number
77 Car phone
78 Children
79 Company main phone
80 Department
81 E-mail address
82 E-mail2
83 E-mail3
84 E-mail list
85 E-mail display name
86 File as
87 First name
88 Full name
89 Gender
90 Given name
91 Hobbies
92 Home address
93 Home city
94 Home country/region
95 Home P.O. box
96 Home postal code
97 Home state or province
98 Home street
99 Home fax
100 Home phone
101 IM addresses
102 Initials
103 Job title
104 Label
105 Last name
106 Mailing address
107 Middle name
108 Cell phone
109 Nickname
110 Office location
111 Other address
112 Other city
113 Other country/region
114 Other P.O. box
115 Other postal code
116 Other state or province
117 Other street
118 Pager
119 Personal title
120 City
121 Country/region
122 P.O. box
123 Postal code
124 State or province
125 Street
126 Primary e-mail
127 Primary phone
128 Profession
129 Spouse/Partner
130 Suffix
131 TTY/TTD phone
132 Telex
133 Webpage
134 Content status
135 Content type
136 Date acquired
137 Date archived
138 Date completed
139 Device category
140 Connected
141 Discovery method
142 Friendly name
143 Local computer
144 Manufacturer
145 Model
146 Paired
147 Classification
148 Status
149 Status
150 Client ID
151 Contributors
152 Content created
153 Last printed
154 Date last saved
155 Division
156 Document ID
157 Pages
158 Slides
159 Total editing time
160 Word count
161 Due date
162 End date
163 File count
164 File extension
165 Filename
166 File version
167 Flag color
168 Flag status
169 Space free
172 Group
173 Sharing type
174 Bit depth
175 Horizontal resolution
176 Width
177 Vertical resolution
178 Height
179 Importance
180 Is attachment
181 Is deleted
182 Encryption status
183 Has flag
184 Is completed
185 Incomplete
186 Read status
187 Shared
188 Creators
189 Date
190 Folder name
191 Folder path
192 Folder
193 Participants
194 Path
195 By location
196 Type
197 Contact names
198 Entry type
199 Language
200 Date visited
201 Description
202 Link status
203 Link target
204 URL
208 Media created
209 Date released
210 Encoded by
211 Episode number
212 Producers
213 Publisher
214 Season number
215 Subtitle
216 User web URL
217 Writers
219 Attachments
220 Bcc addresses
221 Bcc
222 Cc addresses
223 Cc
224 Conversation ID
225 Date received
226 Date sent
227 From addresses
228 From
229 Has attachments
230 Sender address
231 Sender name
232 Store
233 To addresses
234 To do title
235 To
236 Mileage
237 Album artist
238 Sort album artist
239 Album ID
240 Sort album
241 Sort contributing artists
242 Beats-per-minute
243 Composers
244 Sort composer
245 Disc
246 Initial key
247 Part of a compilation
248 Mood
249 Part of set
250 Period
251 Color
252 Parental rating
253 Parental rating reason
254 Space used
255 EXIF version
256 Event
257 Exposure bias
258 Exposure program
259 Exposure time
260 F-stop
261 Flash mode
262 Focal length
263 35mm focal length
264 ISO speed
265 Lens maker
266 Lens model
267 Light source
268 Max aperture
269 Metering mode
270 Orientation
271 People
272 Program mode
273 Saturation
274 Subject distance
275 White balance
276 Priority
277 Project
278 Channel number
279 Episode name
280 Closed captioning
281 Rerun
282 SAP
283 Broadcast date
284 Program description
285 Recording time
286 Station call sign
287 Station name
288 Summary
289 Snippets
290 Auto summary
291 Relevance
292 File ownership
293 Sensitivity
294 Shared with
295 Sharing status
297 Product name
298 Product version
299 Support link
300 Source
301 Start date
302 Sharing
303 Availability status
304 Status
305 Billing information
306 Complete
307 Task owner
308 Sort title
309 Total file size
310 Legal trademarks
311 Video compression
312 Directors
313 Data rate
314 Frame height
315 Frame rate
316 Frame width
317 Spherical
318 Stereo
319 Video orientation
320 Total bitrate
off the top of my head, I think you might be able to do it with by playing with the COM object
$myFileObj = Get-Item -Path "C:\path\to\file"
$shellCom = New-Object -ComObject Shell.Application
$sDirectory = $shellCom.NameSpace($myFileObj.Directory.FullName)
$sFile = $sDirectory.ParseName($myFileObj.Name)
Now do a Get-Member on the $sFile object, so $sFile | Get-Member. If you see that the property Comments has a setter, you should be able to change it. It'll have {get} {set} under Definition. Setting it should be as easy as $sFile.Comments = "blah blah blah"

Using sed to copy data between two numerical patterns to a new file

I'm running a bunch (~320) computational chemistry experiments and I need to pull a small amount of the data out of each of the files so that I can do some work on it in MatLab.
I'm pretty sure I can use sed to make this work, but try as I might I don't seem to be able to do so.
I need all of the data starting at the line beginning with "1 1" and ending with the line starting with "33 33".
I J FI(I,J) k(I,J) K(I,J)
1 1 -337.13279 -0.06697 -0.00430
2 2 3804.89120 8.52972 0.54787
3 3 3195.69653 6.01702 0.38648
4 4 3189.18684 5.99253 0.38490
5 5 3183.73262 5.97205 0.38359
6 6 3174.47525 5.93737 0.38136
7 7 3167.88746 5.91275 0.37978
8 8 1628.80868 1.56311 0.10040
9 9 1623.56055 1.55306 0.09975
10 10 1518.21620 1.35806 0.08723
11 11 1476.93012 1.28520 0.08255
12 12 1341.24087 1.05990 0.06808
13 13 1312.30373 1.01466 0.06517
14 14 1264.73004 0.94242 0.06053
15 15 1185.62592 0.82822 0.05320
16 16 1175.54013 0.81419 0.05230
17 17 1170.41211 0.80710 0.05184
18 18 1090.20196 0.70027 0.04498
19 19 1039.29190 0.63639 0.04088
20 20 1015.00116 0.60699 0.03899
21 21 1005.05773 0.59516 0.03823
22 22 986.55965 0.57345 0.03683
23 23 917.65537 0.49615 0.03187
24 24 842.93089 0.41863 0.02689
25 25 819.00146 0.39520 0.02538
26 26 758.39720 0.33888 0.02177
27 27 697.11173 0.28632 0.01839
28 28 628.75684 0.23292 0.01496
29 29 534.75856 0.16849 0.01082
30 30 499.35579 0.14692 0.00944
31 31 422.01320 0.10493 0.00674
32 32 409.30255 0.09870 0.00634
33 33 227.12411 0.03039 0.00195
33 2nd derivatives larger than 0.371D-04 over 561
MatLab is not a fan of text, so I'd like to not use text delimiters (though there are some in the header of this data section) and keep the data contained to only the numeric lines.
The data files contain a lot of other numbers as well, so I need to match the occurrence of "1 1" at the start of the line and "33 33" as the end of the copy. These 'indices' exist only in this block of info.
I attempted to use
% sed -n /"1 1"/,/"33 33"/p input.file > output.file
But I get a WHOLE BUNCH of data in the output file as it copies everything that shows up between any "1" and "33"
Is there any way to do what I'm looking for?
Also, I'm using the tcsh as that is what my servers run.
How about using awk
awk '$1=="1"&&$2=="1"{t=1};t;$1=="33"&&$2=="33"{t=0}' file
Recommand by #mklement0, if there is only one block, to avoid processing the remainder of the file you can update the command to:
awk '$1=="1"&&$2=="1"{t=1};t;$1=="33"&&$2=="33"{exit}' file
Your problem is twofold. First, there are two blanks between the ones, but your regex only allows for one (judging from the now indented code). Second, you are probably not precise enough; the /1 1/ pattern matches 11 11, for example, and 111 111 and so on.
So, you should consider:
sed -n -e '/^ *1 *1 /,/^33 *33 /p' -e '/^33 33 /q' input.file > output.file
The patterns are anchored to the start of line by the ^ (caret). The numbers are separated by one or more blanks (there are other, longer-winded ways of writing that in standard sed; the + option is not standard sed but is widely available). And the numbers are terminated by a blank. The chances are that the first expression alone will give you what you want. The second expression terminates the search early when it recognizes the 33 33 input line, which can save a significant amount of file I/O and hence processing time if the input file is big enough.
If the lines with ID numbers in the hundreds have some different format, then it should be fairly straight-forward to tweak the regexes to match what is used. If the data contains tabs instead of (or as well as) blanks, you can tweak the regexes to manage that, too.
If you data is all formatted exactly the same as this file, then you can use sed to just read the 3rd through the 35th line (rows 1 1 - 33 33). This is a lot easier than parsing the values, but does require that the files have a standard format:
sed -n 3,35p data.txt
Another cheap way would be to grep for only numeric lines, and take only the first 33:
grep "^[0-9 ][0-9 .-]*$" data.txt | head -n 33

Perl print $(^b)

When I found Perl's $^O, I was curious whether there are more variables like this, because ^ reminded me of a regular expression. When I enter
print "$(^b)";
it comes up with some numbers:
1000 81 90 91 92 93 100 150 1000
What to these mean? Is this some kind of 0xdeadbeef?
I think you are just printing out the value of $(.
The real gid of this process. If you are on a machine that supports membership in multiple groups simultaneously, gives a space separated list of groups you are in. The first number is the one returned by getgid() , and the subsequent ones by getgroups() , one of which may be the same as the first number.
However, a value assigned to $( must be a single number used to set the real gid. So the value given by $( should not be assigned back to $( without being forced numeric, such as by adding zero. Note that this is different to the effective gid ($) ) which does take a list.
You can change both the real gid and the effective gid at the same time by using POSIX::setgid() . Changes to $( require a check to $! to detect any possible errors after an attempted change.
Here is the comparison:
diff <(perl -le 'print "$(";') <(perl -le 'print "$(^b)";')
1c1
< 20 20 402 12 33 61 79 80 81 98 100 204 401
---
> 20 20 402 12 33 61 79 80 81 98 100 204 401^b)
See the documentation on perldoc perlvar for a list of all the various built-in variables (along with their use English; equivalent names).